目前發現公司一些新人還是在使用Copy Item的方式加載第三方庫,實在是太落后了,使用CocoaPods管理第三方庫已經是時代的潮流,趕緊更新起來吧
1、新建一個Xcode測試工程,CoCoaPodsLibraryTest
2、進入工程根目錄:
WechatIMG1.jpeg
3、執行Vim Podfile,輸入如下內容:
Uncomment this line to define a global platform for your project
platform :ios, '8.0'
Uncomment this line if you're using Swift
use_frameworks!
target 'CoCoaPodsTest' do
pod 'Masonry'
pod 'SDWebImage'
pod 'MJRefresh'
pod 'MJExtension'
pod 'LCProgressHUD'
pod 'AFNetworking'
pod 'IQKeyboardManager'
pod 'FDFullscreenPopGesture'
pod 'Reachability'
end
4、terminal----->pod update --verbose --no-repo-update
5、進入工程根目錄,打開CoCoaPodsTest.xcworkspace
6、如果想要刪除某個lib,直接移除,再執行:pod update --verbose --no-repo-update
是不是很簡單?通過CocoaPods管理第三發lib可以快速集成框架,一鍵開發