-
-
Notifications
You must be signed in to change notification settings - Fork 48
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: Barcode Scanning plugin failing to build on simulator for fresh Ionic project #148
Comments
So I found how I can fix this by altering the I'm not sure if this is a problem with this plugin, or a missing feature of capacitor to allow for building using Rosetta, especially now that this option to do this as a configuration within Xcode has been removed by Apple. |
This should fix your issue: https://capawesome.io/blog/troubleshooting-capacitor-ios-issues/#could-not-find-module-capacitor-for-target-x86_64-apple-ios-simulator No need to use Rosetta. Feel free to take a look at the official demo app for reference: https://github.com/robingenz/capacitor-mlkit-plugin-demo/blob/main/ios/App/Podfile |
Thanks for your response. I already tried this, and unfortunately, it does not work. I added the lines to the reproduction repo as well, so you can see what I did and try it out yourself if you want. Edit: actually, I tried running the demo app, but that app errors out with the same error as well:
Repro path:
Added Ionic versions to opening post: |
Okay, now I was able to reproduce your problem. But only in the simulator, on a device it works without problems. |
Works! Thanks alot. Since from now on all newcomers will pretty much experience what I've experienced when they want to run their app on a simulator, it might be handy to add this to the documentation or FAQ or something similar. Anyway, thank you very much for helping out! |
I'm glad that it is now working. I have updated the blog post. |
Plugin(s)
Version
6.0.0
Platform(s)
Current behavior
When adding the barcode scanning plugin, version 6.0.0, the capacitor ceases to build the app via the command line. Error:
SwiftEmitModule normal x86_64 Emitting\ module\ for\ App (in target 'App' from project 'App')
. Just before adding this package it all worked just fine.Expected behavior
To be able to build my Ionic app
Reproduction
https://github.com/JaapWeijland/barcode-scanning-repro
Steps to reproduce
ionic start
and create a blank React app.ionic cap add ios
ionic cap run ios
iPhone 15 simulator
npm i @capacitor-mlkit/barcode-scanning
ionic cap sync
ionc cap run ios
iPhone 15 simulator
Other information
Apple M1 Pro, Sonoma 14.4.1
Xcode 15.3
Simulator iPhone 15
Cocoapods 1.15.2,
which pod
: /opt/homebrew/bin/pod (so its installed with homebrew)ionic --version
:7.2.0
ionic cap --version
:7.2.0
(not sure if this matters)Using capacitor v6
Note: when I run the app via Xcode choosing a simulator with rosetta active, it works. However, I can't choose these rosetta simulators in the list
ionic cap run ios
provides me.Capacitor doctor
[success] iOS looking great! 👌
Before submitting
The text was updated successfully, but these errors were encountered: