Comments (6)
So I found how I can fix this by altering the ionic cap ios run
command of capacitor. In node_modules, in the file @capacitor/cli/dist/ios/run.js
, change the line that says id=${target.id}
to id=${target.id},arch=x86_64
. This will force capacitor to build the project using Rosetta, which is needed to build a project using this plugin for a simulator.
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.
from capacitor-mlkit.
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
from capacitor-mlkit.
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:
SwiftEmitModule normal x86_64 Emitting\ module\ for\ App (in target 'App' from project 'App')
Repro path:
- Clone project
ionic cap sync
ionic cap ios run
Added Ionic versions to opening post:
ionic --version
: 7.2.0
ionic cap --version
: 7.2.0
(not sure if this matters)
from capacitor-mlkit.
Okay, now I was able to reproduce your problem. But only in the simulator, on a device it works without problems.
This is how i fixed it: robingenz/capacitor-mlkit-plugin-demo@febf323
from capacitor-mlkit.
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!
from capacitor-mlkit.
I'm glad that it is now working. I have updated the blog post.
from capacitor-mlkit.
Related Issues (20)
- bug: cannot scan with phone facing an angle of 30-45 degrees (iOS) HOT 5
- feat(barcode-scanning): support all barcode types
- bug(barcode-scanning): `NullPointerException` during `startScan(...)` HOT 22
- ⚡ Capacitor 6 HOT 1
- refactor(barcode-scanning): throw error if no scan session is active
- refactor(barcode-scanning): do not automatically request permissions
- bug: flat orientation on ios HOT 9
- Focus in center/scanning box HOT 8
- bug: HOT 2
- feat: Subject segmentation HOT 5
- bug: iOS Corner points detection issue HOT 29
- feat(barcode-scanning): add `cornerPoints` option HOT 2
- bug: QR code scanning using browser HOT 2
- bug: startScan can not scan long text qrcode HOT 1
- feat: Scan Multiple QR Codes at once HOT 5
- EAN13 code detected as UPC-A HOT 1
- bug: Scan QrCode doesn't work on Samsung A23 HOT 8
- bug: Issues on Android when using biometric plugin and photo viewer HOT 4
- bug(barcode-scanning): googleBarcodeScannerModuleInstallProgress progress percentage is rounded incorrectly HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from capacitor-mlkit.