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

bug: Build failed because Capacitor.swiftmodule is missing a required architecture. Would you like to build for rosetta instead? #153

Closed
5 of 11 tasks
VerburgtJimmy opened this issue May 16, 2024 · 1 comment

Comments

@VerburgtJimmy
Copy link

VerburgtJimmy commented May 16, 2024

Plugin(s)

  • Barcode Scanning
  • Face Detection
  • Face Mesh Detection
  • Selfie Segmentation
  • Translation

Version

6.0.0

Platform(s)

  • Android
  • iOS
  • Web

Current behavior

After I upgraded my ionic application to V8 and my capacitor version to V6 I can't build my app on ios. I am getting the following message as a popup when building the app with 'ionic cap build ios' and then running it in xcode 15: Build failed because Capacitor.swiftmodule is missing a required architecture. Would you like to build for rosetta instead?
And in the output of xcode it gives this error: Could not find module 'capacitor; for target 'x86_64-apple-ios-simulator' found: arm64-apple-ios-simulator.

I already made a issue on the capacitor github. But after some testing I found that the error is removed when i remove the @capacitor-mlkit/barcode-scanning package from my project. Therefore i made a new issue here.

Expected behavior

That when i run the new build i don't get the error displayed above.

And just to be clear. This did work before upgrading to capacitor v6 so the problem lies there

Reproduction

https://github.com/VerburgtJimmy/ionicV8problem

Steps to reproduce

  1. clone the new clean install of a ionic v8 project with capacitor v6
  2. add the @capacitor-mlkit/barcode-scanning v6.0.0 package
  3. do npm install
  4. do ionic cap add ios
  5. do ionic cap build ios
  6. run the app in xcode v15.* on a ios 17.4 simulator. Make sure to not use a rosetta simulator
  7. Now you will get the error that i spoke about above.

Other information

npm version: 10.7.0

Capacitor doctor

Latest Dependencies:
@capacitor/cli: 6.0.0
@capacitor/core: 6.0.0
@capacitor/android: 6.0.0
@capacitor/ios: 6.0.0

Installed Dependencies:
@capacitor/cli: 6.0.0
@capacitor/core: 6.0.0
@capacitor/android: 6.0.0
@capacitor/ios: 6.0.0

Before submitting

  • I have read and followed the bug report guidelines.
  • I have attached links to possibly related issues and discussions.
  • I understand that incomplete issues (e.g. without reproduction) are closed.
@robingenz
Copy link
Member

Please take a look at this blog post: https://capawesome.io/blog/troubleshooting-capacitor-ios-issues/#could-not-find-module-capacitor-for-target-x86_64-apple-ios-simulator

You need to add some code to your Podfile. Also, this issue has already been discussed in #85, #99 and #148. Please search for old issues first before creating a new one. I'm therefore closing this issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants