有没有办法将架构包含在 CocoaPods 中Podfile
?我正在尝试为 32 位和 64 位构建我的应用程序,但是当我切换到Standard architectures (including 64-bit)
在我的项目的构建设置中,它抱怨我应该让它自动选择架构。这样做会将我的项目恢复到Standard architectures
。我感觉 Xcode 这样做是因为 Pods 项目(在我的 Xcworkspace 中)的架构中不包含 64 位。有没有办法将其添加到Podfile
(我认为如果 Pod 自己做会更好)或者我也应该在 Pods 项目中更改它。
我现在的Podfile
:
xcodeproj 'Nobles/Nobles.xcodeproj'
platform :ios, '7.0'
pod 'Reachability'
pod 'TWTSideMenuViewController'
我正在寻找类似问题的答案并发现:
解决由于仅针对活动架构构建目标而导致的 CocoaPods 构建错误 http://samwize.com/2014/05/15/resolving-cocoapods-build-error-due-to-targets-building-for-only-active-architecture/
在 pod 安装后,我总是遇到构建错误,因为默认情况下,CocoaPods 会将您的 pod 配置为仅针对活动架构进行构建(在调试期间)。
解决方案是将 Pods 项目设置“Build Active Architecture Only”更改为“NO”以进行调试。
但是每次运行 pod install 后都进行更改是很乏味的(因为您的更改将恢复为 YES)。
正如 msmollin 在 CocoaPods issues 中所建议的,您可以通过以下方式修复:
# Append to your Podfile
post_install do |installer_representation|
installer_representation.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
end
end
end
也许这可以帮助你?
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)