我的团队最近开始使用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”>“Architecture”中,"Base SDK“被设置为"No SDK (最新OS X)","Build Active Architecture Only”> "Debug“设置为"Yes”,"Supported“设置为"OS X”。在将它们分别更改为“iOS (iOS 7.0)”、"No“和"iOS”之后,为iPhone 5构建的程序和模拟器都工作得很好。
但是,每次我们执行Pod update时,这三个设置都会恢复到以前的状态,这是很烦人的。
我的问题是:
任何帮助都将不胜感激。
发布于 2014-05-15 02:58:48
正如在CocoaPods问题中提到的,您可以将其附加到您的Podfile中:
post_install do |installer_representation|
installer_representation.project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
end
end
end这将使所有的吊舱为所有拱门建造。
https://stackoverflow.com/questions/20464183
复制相似问题