Googlemlkit何时支持ARM64模拟器

发布于 2025-01-17 14:42:26 字数 328 浏览 2 评论 0 原文

我们在iOS上使用Googlemlkit,现在我们的团队正在改用M1 MacBook。 我们必须设置一些条件才能使其在iOS-ARM64-Simulator上工作,例如

“在此处输入图像说明”

我想知道Google官方是否有计划支持ios-arm64-Simulator 例如提供XCFramework?

We're using GoogleMLKit on iOS, and right now our team is switching to m1 Macbook.
We have to set some conditions to make it work on ios-arm64-simulator like this

enter image description here

I'd like to know if google official has a plan to support ios-arm64-simulator
such as providing an xcframework?

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

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

发布评论

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

评论(3

时光瘦了 2025-01-24 14:42:26

是的,我们有一个计划,但可能需要一些时间才能找到解决方案。

Yes, we have a plan, but it can take some time to find a solution.

心安伴我暖 2025-01-24 14:42:26

对于该线程中的每个人来说都是好消息。

我花了一周的时间寻找这个问题的解决方案/解决方法(MLKit 在 iOS 模拟器上构建)。我现在终于能够在模拟器上运行 MLKit(翻译)了。请按照以下步骤操作:

免责声明:
到目前为止,添加以下配置后我还没有遇到任何问题。如果我发现任何问题,我会将其发布在此处。

  1. 在“排除的架构”中:对于每个目标集“任何 iOS Simulator SDK:i386 arm64”。
  2. MLKit 不允许在 32 位上运行。我们可以在Architectures中配置它,但是它与iOS模拟器冲突。因此,我在排除架构中配置了它:对于每个目标集“任何 iOS SDK:armv7”。
  3. 在 Info.plist 中添加“所需的设备功能”,仅包含“arm64”项。

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

在 Macbook M1 上使用 Xcode 15.3

您可以从此屏幕截图确认最终配置

Good news for everyone on this thread.

I have spent a week finding a solution/workaround for this issue (MLKit build on iOS Simulator). I have now finally been able to run MLKit (Translate) on the simulator. Please follow the steps below:

Disclaimer:
Up until now, I haven't faced any issues after adding the below configurations. If I find any issues, I will post them here.

  1. In "Excluded Architectures": For every target set "Any iOS Simulator SDK: i386 arm64".
  2. MLKit does not allow running on 32-bit. We can configure it in Architectures, but it conflicts with iOS simulators. So, I configured it in Excluded Architectures: For every target set "Any iOS SDK: armv7".
  3. Add "Required device capabilities" in Info.plist with only the item "arm64".

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

Using Xcode 15.3 on Macbook M1

You can confirm the final configurations from this ScreenShot screenshot.

风流物 2025-01-24 14:42:26

我设法通过切换到Rosetta:

Product≫目的地>显示所有运行目的地

,然后选择所需的模拟器,但(Rosetta)版本

I managed to run the app on simulator by switching to Rosetta:

Product > Destination > Show All Run Destinations

Then choose the simulator you need, but (Rosetta) version

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