ios – 使用link_with使我的项目失败,CocoaPods 0.37

前端之家收集整理的这篇文章主要介绍了ios – 使用link_with使我的项目失败,CocoaPods 0.37前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我的所有目标使用相同的库,因此我使用link_with使我的podfile整洁.但令我惊讶的是,编译的项目失败了. Xcode抱怨它无法在pod中找到一些文件,例如

diff: /../Podfile.lock: No such file or directory diff:
/Manifest.lock: No such file or directory error: The sandBox is not in
sync with the Podfile.lock. Run ‘pod install’ or update your CocoaPods
installation.

‘DDLog.h’ file not found

我再次运行pod安装并一次又一次清理xcode.但没有运气.我无法弄清楚原因.从我所看到的,cocopods只将每个目标的shellScript更改为一个Pods-resources.sh,这就是link_with应该做的,对吧?

shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-CloudPhone/Pods-"my target"-resources.sh\"\n";
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n";

这是cocopods的错误吗?我正在使用最新的0.37,现在我回去单独指定每个目标.

更新:

CocoaPods 1.0已删除link_with而支持abstract_target

解决方法

我认为这是一个pods bug.当项目最初指定目标特定配置并稍后尝试将其组合时,pod不会更新脚本位置.

要修复,请转到Build phases-> Embedd pod framework->更新脚本文件位置以反映通用pod文件夹(如/Pods/Pods-frameworks.sh“).[您可以在finder中导航以找到sh所在的确切位置].删除任何其他不反映的脚本物理文件夹.现在项目应该编译.

猜你在找的Xcode相关文章