我的团队最近开始使用CocoaPods来管理iOS应用程序项目中的依赖项.
这是podfile:
platform :ios, '6.0' pod "UI7Kit" pod "AFNetworking", "~> 2.0" pod "TMCache" pod "SVProgressHUD" pod "SVPullToRefresh"
但是,在使用CocoaPods之后,iPhone 5的构建目标总是失败,但成功的模拟器.
这是错误日志:
ld: warning: ignoring file [DerivedData directory]/libPods.a, file was built for archive which is not the architecture being linked (armv7): [DerivedData directory]/libPods.a Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SVProgressHUD", referenced from: objc-class-ref in ....o "_OBJC_CLASS_$_TMCache", referenced from: objc-class-ref in ....o "_OBJC_CLASS_$_UI7Kit", referenced from: objc-class-ref in ....o ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)
我尝试过CocoaPods故障排除中提到的解决方案,包括Pods
在列表顶部添加静态库,但它仍然失败.
后来我们发现在"Pods Project Settings">"Build Settings">"Architectures"中,"Base SDK"设置为"No SDK(Latest OS X)","Build Active Architecture Only">"Debug"设置为"是"和"支持的平台"设置为"OS X".将它们分别更改为"最新iOS(iOS 7.0)","否","iOS"后,为iPhone 5和模拟器构建都可以正常工作.
但是,每次我们这样做时Pod update
,所有这三个设置都会恢复到以前的状态,这很烦人.
我的问题是:
这种情况是设计还是我的项目/工作区设置有问题?
如何防止这些设置恢复到错误的状态?
任何帮助将不胜感激.