构建期间未设置 Cocoapods EXCLUDED_ARCHS 标志
我正在尝试构建我的项目,但在部署到模拟器而不是实际设备时不断收到“未找到模块”的消息。经过深入研究,我发现我应该将 arm64
添加到所有目标的构建设置的排除的架构部分。
我用了这个 SO问题作为参考,但是arm64
没有被设置。
有人看到我做错了什么吗?
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings["ONLY_ACTIVE_ARCH"] = "YES"
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
end
I am trying to build my project but kept getting 'No Module Found' when deploying to the simulator but not to an actual device. After digging around, I found I should add the arm64
to the Excluded Archtiectures section of the building settings for all my targets.
I used this SO question as a reference, however the arm64
is not being set.
Anyone see what I have done wrong?
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings["ONLY_ACTIVE_ARCH"] = "YES"
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
end
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能使用不支持 M1 Mac 模拟器的二进制 Pod。您设置的选项在整个构建中排除 M1,以使项目能够针对设备和 Intel 模拟器进行构建。
请联系 pod 提供商,要求他们添加 M1 支持。
You're likely using a binary pod that does not support the M1 Mac simulator. The option you're setting is excluding the M1 for the whole build to enable the project to build for devices and Intel simulators.
Contact the pod provider to ask them to add M1 support.