為了驗(yàn)證是否替換成功并且僅是taobao,可以用以下命令查看
$ gem sources -l只有在終端中出現(xiàn)下面文字才表明你上面的命令是成功的:
*** CURRENT SOURCES *** http://ruby.taobao.org/安裝cocoapods$ sudo gem install cocoapods2.編輯podfile,這是示例
# Uncomment the next line to define a global platform for your PRoject# platform :ios, ‘9.0’target 'Kara' do# Uncomment the next line if you're using Swift or would like to use dynamic frameworksuse_frameworks! # Pods for Kara pod 'MQTTClient' pod 'JSQMessagesViewController' pod 'SwiftyJSON' pod 'SnapKit', '~> 3.0.2' #pod 'ReactiveCocoa', '5.0.0-alpha.3' pod 'SDWebImage', '~>3.8' pod 'AFNetworking', '~> 3.0' pod 'FDStackView', '1.0' pod 'MJRefresh' pod 'IQKeyboardManagerSwift' pod 'SCLAlertView-Objective-C' pod 'SKPhotoBrowser', :git => 'https://github.com/suzuki-0000/SKPhotoBrowser.git', :branch => 'swift3' pod 'RSKImageCropper'end創(chuàng)建pod工程文件pod installuse_frameworks! 這個(gè)主要是決定是否適用動(dòng)態(tài)庫? 如果打開以后,引入的OC庫在橋接文件中的寫法會(huì)不一樣 比如,不開啟時(shí)這樣用:
#import <MQTTClient.h>開啟后:
#import <MQTTClient/MQTTClient.h>否則會(huì)找不到.h文件,而且實(shí)用use_frameworks后,OC庫必須要import才能編譯??
新聞熱點(diǎn)
疑難解答
圖片精選
網(wǎng)友關(guān)注