在构建iOS模拟器时,是否可以排除特定的POD?

发布于 2025-01-30 15:01:49 字数 389 浏览 4 评论 0原文

目前,我面临的问题是,我的一个项目之一在使用Google MLKit的吊舱之一时无法构建为ARM64模拟器。

我在互联网周围搜索,但找不到与此相似的东西。

是否有可能从构建到模拟器中排除特定的POD(在这种情况下为Google MLKIT)?还是仅包含设备构建?

ld: building for iOS Simulator, but linking in object file built for iOS, file 'app/ios/Pods/MLKitBarcodeScanning/Frameworks/MLKitBarcodeScanning.framework/MLKitBarcodeScanning' for architecture arm64

谢谢。

Currently I'm facing a problem, that one of my projects can't be built to arm64 simulator when using one of the Google MLKit's pods.

I was searching all around the internet, but couldn't find anything similar to this.

Is it somehow possible to exclude specific pod (in this case Google MLKit) from build to simulator? Or include it only to device builds?

ld: building for iOS Simulator, but linking in object file built for iOS, file 'app/ios/Pods/MLKitBarcodeScanning/Frameworks/MLKitBarcodeScanning.framework/MLKitBarcodeScanning' for architecture arm64

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

秉烛思 2025-02-06 15:01:49

我使用的是Xcode 13和带有M1芯片的MacBook,并且

在我发现的MLKIT上遇到了同样的错误:

  1. iOS模拟器不允许运行ARM64架构(在真实设备中不像ARM64的模拟器中的ARM64架构)。因此,在“排除体系结构”中:“任何iOS模拟器SDK:i386 arm64”(使用默认值)(包括调试,配置文件,发行版)

  2. mlKits

    mlkits

    mlkits bs bs bs bs bl 32位都不允许运行。我们可以在体系结构中进行配置,但它与上面的iOS模拟器冲突。因此,我在排除架构中进行配置:“任何ios SDK:ARMV7”(包括调试,配置文件,发行版)

  3. 添加信息中的“必需的设备功能”,仅在Infor中添加项目“ ARM64”

现在我的项目可以在iOS模拟器(X86_64)和真实设备(ARM64)上自动运行。

这是我的配置

I am using Xcode 13 and a MacBook with M1 chip and faced same error with MLKits

I had found that:

  1. iOS simulator not allow run arm64 architecture (arm64 in simulators not like arm64 in real devices). So in "excluded architectures": "Any iOS simulator SDK: i386 arm64" (use default) (include debug, profile, release)

  2. MLKits does not allow run on 32 bit. We can config it in Architectures but it conflict with iOS simulators above. So I config it in excluded architectures: "Any iOS SDK: armv7" (include debug, profile, release)

  3. Add "Required device capabilities" in Info and only item "arm64"

Now my project can auto run on iOS simulators (x86_64) and real devices (arm64).

Here is my config

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