執(zhí)行完pod install之后侵续,控制臺拋出以下警告信息:
[!] The use of implicit sources has been deprecated. To continue using all of the sources currently on your machine, add the following to the top of your Podfile:
source 'https://github.com/CocoaPods/Specs.git'
[!] The `ProjectName [Debug]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods/Pods.debug.xcconfig'. This can lead to problems with the CocoaPods installation
[!] The `ProjectName [Release]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods/Pods.release.xcconfig'. This can lead to problems with the CocoaPods installation
.debug.xcconfig丟失
如果不解決此問題的話倔丈,會出現(xiàn)由于部分庫文件找不到而導(dǎo)致的種種問題:
(1)編譯失敗,拋出Undefined symbols for architecture i386錯(cuò)誤
(2)調(diào)用庫中的方法状蜗,拋出unrecognized selector sent to instance錯(cuò)誤
?
解決方法如下:
1需五、打開工程所在文件夾,找到.xcodeproj文件诗舰,右鍵選擇【顯示包內(nèi)容】警儒,找到project.pbxproj文件
2、打開project.pbxproj文件,查找OTHER_LDFLAGS蜀铲,把和這個(gè)相關(guān)的內(nèi)容都刪除
3边琉、重新執(zhí)行pod install,此時(shí)應(yīng)該就沒有上面出現(xiàn)的警告信息了
4记劝、編譯并運(yùn)行
問題二:
3变姨、
$?pod?setup
Setting?up?CocoaPods?master?repo
[!]?/usr/bin/git?clonehttps://github.com/CocoaPods/Specs.git?master
Cloning?into?‘master’…
error:?RPC?failed;?curl56?SSLRead()return?error?-9806
fatal:?The?remote?end?hung?up?unexpectedly
fatal:?early?EOF
fatal:?index-pack?failed
4、
$?pod?setup
Setting?up?CocoaPods?master?repo
[!]?/usr/bin/git?clonehttps://github.com/CocoaPods/Specs.git?master
Cloning?into?‘master’…
error:?RPC?failed;?curl18?transfer?closed?with?outstanding?read?data?remaining
fatal:?The?remote?end?hung?up?unexpectedly
fatal:?early?EOF
fatal:?index-pack?failed
解決方法:上面錯(cuò)誤主要是os10.11+和cocoapods1.0+版本升級的安全機(jī)制更改造成的厌丑。主要出現(xiàn)在pod setup過程中定欧。且該過程等待時(shí)間非常長,所以怒竿,你可以在$sudo gem install -n /usr/local/bin cocoapods命令后直接執(zhí)行$Gitclone https://git.coding.net/CocoaPods/Specs.git ~/.cocoapods/repos/master 該過程作用與 pod setup作用相同砍鸠,作者親測。效果極佳8邸R琛!朦肘!
如果還不成功7构!C娇佟弟断!可以同樣的方法安裝正式版v0.39 然后在升級到v1.0版本
gem update --system
sudo geminstall?-n /usr/local/bin?cocoapods--pre