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
- Use the
$(inherited)
flag, or
- Remove the build settings from the target.
[!] The YMTea [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
- Use the `$(inherited)` flag, or - Remove the build settings from the target.
原因:我是在已有项目中集成Cocoapods的时候遇到这个问题,原因是项目 Target 中做了一些设置,CocoaPods 也做了默认的设置,如果两个设置结果不一致,就会造成问题。
解决方法:我想要使用 CocoaPods 中的设置,分别在我的项目中定义PODS_ROOT
和 Other Linker Flags
的地方(build settings),把他们的值用$(inherited)
替换掉,进入终端,执行 pod update
警告没了,回到 Xcode,build通过。
网上还流行另外一种简单粗暴的方法:点击项目文件 project.xcodeproj,右键显示包内容
,用文本编辑器打开project.pbxproj
,删除OTHER_LDFLAGS
的地方,保存(这种我没试过)
4.
[!] Oh no, an error occurred.
It appears to have originated from your Podfile at line 2.
Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=%2FUsers%2Fxiao6%2FMusic%2FGI06%E5%AE%9E%E8%AE%AD%E8%8A%B8%E8%8C%97%E8%8C%B6%E5%8F%B6%2FYMTea%2FPodfile%3A2%3A+syntax+error%2C+unexpected+%27%3A%27%2C+expecting+end-of-input%0Aplatform+%3A+ios%2C+%277.0%27%0A++++++++++%5E&type=Issues
If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new
Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md
Don't forget to anonymize any private data!
原因:这个问题比较蛋疼,弄了好久,仔细看发现就是因为Podfile文件里面 platform 那一行 冒号和ios之间多了一个空格。。。。其实这个错误在报错的时候ruby已经给出了,只是一开始没有好好看
附:如何使用CocoaPods的镜像索引:
所有项目的Podspec文件都托管在https://github.com/CocoaPods/Specs,
第一次执行pod setup时,CocoaPods会将这些podspec索引文件更新到本地的~/.cocoapods目录下,
这个索引文件比较大,所以第一次更新时非常慢.
友好人士在国内的服务器建立了Cocoapods索引库的镜像,
所以执行索引跟新操作时候会快很多.具体操作方法如下:
$ pod repo remove master
$ pod repo add master https://gitcafe.com/akuandev/Specs.git
$ pod repo update
这是使用gitcafe上的镜像,将以上代码中的 https://gitcafe.com/akuandev/Specs.git
替换成 http://git.oschina.net/akuandev/Specs.git 即可使用oschina上的镜像。
相关阅读:
1.CocoaPods的安装使用和常见问题
2.关于Cocoapods安装的小细节错误