教程网上都有很多了,暂且不表,这篇文章主要是用来记录整个过程,为了兼容也是选取的OC语言,望大家见谅,后续会出一个swift工程的教程。
首先我们应该采用cocoapods集成第三方库,cocoapods的使用,网上也有很多教程了。
然后我们来看看我们cocoapods都有哪些第三方库
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '12.0'
target 'AKASO_GO' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
pod 'MJExtension'
pod 'YTKNetwork'
pod 'YYKit'
pod 'ZFPlayer/AVPlayer', '~> 4.0'
pod 'ZFPlayer/ControlView', '~> 4.0'
pod 'Masonry'
pod 'WoodPeckeriOS', :configurations => ['Debug']
pod 'MBProgressHUD'
pod 'SDCycleScrollView'
# Pods for AKASO_GO
pod 'CocoaLumberjack'#日志收集
pod 'CHTCollectionViewWaterfallLayout/ObjC'
pod 'BGFMDB'
pod 'MJRefresh'
pod 'JXCategoryView'
pod 'JXPagingView/Pager'
pod 'AWSS3'
pod 'BabyBluetooth'
pod 'CocoaAsyncSocket'
pod 'KTVHTTPCache'
# pod 'MLeaksFinder', :configurations => ['Debug']
# pod 'FBRetainCycleDetector'
pod 'IQKeyboardManager'
pod 'SSZipArchive'
pod 'mob_sharesdk'
pod 'mob_sharesdk/ShareSDKPlatforms/WeChat'
pod 'mob_sharesdk/ShareSDKPlatforms/Facebook'
pod 'mob_sharesdk/ShareSDKPlatforms/Apple'
target 'AKASO_GOTests' do
inherit! :search_paths
# Pods for testing
end
target 'AKASO_GOUITests' do
# Pods for testing
end
end
1.尤其要注意的是pod 'mob_sharesdk/ShareSDKPlatforms/Facebook'
加载这个库,由于facebook
是用swift
写的,需要在项目里生成一个swift-header
文件才能使用,之所以使用mob_sharesdk,是因为集成度高方便使用登录功能,我的项目中只需要使用登录功能。
2.MLeaksFinder
在新的项目里不兼容,所以暂时无法用
3.KTVHTTPCache
与ZFPlayer/AVPlayer
可以结合起来用来做视频缓存
4.BGFMDB
用来做数据库存储
5.AWSS3
亚马逊上传一些图片火石坡
6.JXCategoryView
用作分页滑动相关
7.CHTCollectionViewWaterfallLayout
瀑布流
8.SSZipArchive
压缩和解压缩
9.SDCycleScrollView
滚动的banner
10.CocoaLumberjack
日志收集
11.WoodPeckeriOS
一个优秀的调试工具
其他的第三方库都是常见的,就不一一细数