iOS:Cocoapods报错问题集锦

NO.1

项目中有多个target,运行pod install,出现以下问题:

[!] The `xxx [Release]` target overrides the `GCC_PREPROCESSOR_DEFINITIONS` build setting defined in `Pods/Target Support Files/Pods-xxx/Pods-xxx.release.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

解决方法:Targets–>Build Settings–>Preprocessor Macros,加上$(inherited),然后重新pod install就OK了。

NO.2

 [!] Unable to accept duplicate entry for: XXXXX (0.0.1)

意思是:不能接受同一版本重复提交。

NO.3

The validator for Swift projects uses Swift 3.0 by default, if you are using a different version of swift you can use a `.swift-version` file to set the version for your Pod. For example to use Swift 2.3, run: 
    `echo "2.3" > .swift-version`.

swift版本不对,终端执行以下即可:

echo "3.0" > .swift-version

待续!!!

猜你喜欢

转载自blog.csdn.net/liuq0725/article/details/61913629