构建期间未设置 Cocoapods EXCLUDED_ARCHS 标志

发布于 2025-01-09 22:09:32 字数 651 浏览 1 评论 0原文

我正在尝试构建我的项目,但在部署到模拟器而不是实际设备时不断收到“未找到模块”的消息。经过深入研究,我发现我应该将 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

独享拥抱 2025-01-16 22:09:32

您可能使用不支持 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文