1. cocoaPods集成ReactiveCocoa時出現(xiàn)警告Pods written in Swift can only be integrated as frameworks…. 之后安裝不成功
問題原因: 三方種存在swift編寫的代碼 沒有靜態(tài)庫需要用frameworks 替換
解決辦法: 在podFile 里這個 pod ‘ReactiveCocoa’, ‘~> 4.1.0’ #響應(yīng)式編程
前一行添加use_frameworks! 使用框架即可
2. cocoaPods 集成之后ReactiveCocoa響應(yīng)式編程框架報錯:
1.編譯時Pod文件里錯誤:Cannot create __weak reference in file using manual reference counting
2.引入頭文件出現(xiàn):Could not build module ‘ReactiveCocoa’, 不能構(gòu)建ReactiveCocoa模塊
解決辦法:打開Target -> Build Settings -> Apple LLVM 7.1 - Language - Objective C -> Weak References in Manual Retain Release to YES.
如果還是不行的話可以在找到Build Settings ->Linking -> Other Linker Flags 看看設(shè)沒設(shè)置 -Objc 和 -all_load
3.0 [摘要:設(shè)置 Project->Info->Configurations,正在Configurations內(nèi)里吧Debug 戰(zhàn)Release的Tests 的None改成pods就能夠啦]
設(shè)置 Project->Info->Configurations,在Configurations里面吧Debug 和Release的Tests 的None改為pods就可以啦
4.0,embedded dylibs/frameworks are only supported on iOS 8.0 and later (@rpath/AFNetworking.framework/AFNetworking) for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
原因:主要是因為XXX的framework支持的最低開發(fā)環(huán)境為8.0,而使用該framework的工程支持版本為8.0以下(我這里的環(huán)境為4.3)
解決方法:選擇低版本的開發(fā)環(huán)境脑慧,重新編譯XXX的framework
5.0 Undefined symbols for architecture arm64: “_OBJC_CLASS_$_PayTabCardReaderViewController”, referenced from: objc-class-ref in ViewController.o辟躏。出現(xiàn)這個錯誤的原因有很多? ? 通常的原因一個一個排除? 還有一種是由于cocoapods造成的既们。在cocoapods中出現(xiàn)這樣的警告.根據(jù)警告的提示進(jìn)行操作,Go to your target Build Settings -> Other linker flags -> double click . Add $(inherited) to a new line.If you have problem with "...target overrides the GCC_PREPROCESSOR_DEFINITIONS build setting defined in..." then you must add $(inherited) to your target Build Settings -> Preprocessor Macros,添加上這個標(biāo)志符號殊霞,就可以解決$(inherited)