Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Add a flag for ios run to allow for building with Rosetta enabled #7425

Open
1 of 3 tasks
JaapWeijland opened this issue Apr 23, 2024 · 5 comments
Open
1 of 3 tasks
Labels

Comments

@JaapWeijland
Copy link

Description

Because some plugins can't be build for simulators using arm64 arch, it would be nice to allow for building for simulators using Rosetta using the cli.

Platforms

  • iOS
  • Android
  • Web

Request or proposed solution

Add a flag like --arch_x86_64 or --with-rosetta or similar to allow for building for simulators using the x86_64 arch. Currently all simulators listed when using ios run with Xcode 15.3 are arm64 targets and some plugins don't support arm64, like the capacitor-mlkit/barcode-scanning plugin.

I verified that the core of this problem is solved by adding ,arch=x86_64 to this line:

`id=${target.id}`,

Alternatives

No response

Additional Information

This feature came to mind when I was debugging this issue: capawesome-team/capacitor-mlkit#148.

@JaapWeijland
Copy link
Author

My problem has been solved by the kind folks over at capawesome, however, I needed to edit the Podfile to make it work. This means I have to check in my ios folder, which I'd rather not do to make sure the ios and android configurations are automated (for example with Trapeze). Would it still make sense to add such a future for during development?

@BeetrootToYourself
Copy link

+1

@therealjmj
Copy link

My problem has been solved by the kind folks over at capawesome, however, I needed to edit the Podfile to make it work. This means I have to check in my ios folder, which I'd rather not do to make sure the ios and android configurations are automated (for example with Trapeze). Would it still make sense to add such a future for during development?

Podfile changes should be ok to commit to git, in my experience. You will have to make these modifications again if you ever remove the iOS platform and re-add it.

What specific changes did you add? I'm running into the same issue.

Also, will you be able to deploy to device? iOS devices run arm64.

@JaapWeijland
Copy link
Author

The solution to my problem was posted here:

capawesome-team/capacitor-mlkit#148

@markemer
Copy link
Member

What Podfile changes did you need to make? Just adding SUPPORTED_ARCHS?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants