vision-camera-code-scanner
vision-camera-code-scanner copied to clipboard
Cannot compile for M1 simulators
Hey guys,
I'd like to know if anyone has had any issues compiling this module for simulators on M1 laptops? It works fine on my local iOS device, but the build fails if I point to any simulator on Xcode 13.2
This is the error message I'm getting:
Showing Recent Errors Only
Building for iOS Simulator, but linking in object file built for iOS, file '/ios/Pods/MLKitBarcodeScanning/Frameworks/MLKitBarcodeScanning.framework/MLKitBarcodeScanning' for architecture arm64
I tried to add arm64 to Excluded Architectures and setting Build Active Architecture Only to true - but still not working. Does anyone know a workaround for that?
Thanks in advance!
@bsmayer Issue possible duplicated https://github.com/rodgomesc/vision-camera-code-scanner/issues/34
You can use Rosseta
install Rosseta using the terminal
softwareupdate --install-rosetta
Then go to Applications -> Right Click Xcode -> Select "Get Info" -> check the "Open with rosseta" option Open Xcode -> Open project and try again
I'm on an M1 Mac and regularly run my app in the simulator with no issues. Very difficult to test things like camera scanning in a simulator, however.
@bsmayer Issue possible duplicated #34
You can use Rosseta
install Rosseta using the terminal
softwareupdate --install-rosetta
Then go to Applications -> Right Click Xcode -> Select "Get Info" -> check the "Open with rosseta" option Open Xcode -> Open project and try again
will this always be needed or it will support native m1 at some point ?
In my opinion arm64
should not be added to excluded architectures
when building for an iOS simulator on Apple Silicon (M1, M2, etc.) without using Rosetta
.
Unfortunately, seems like ML Kit related pods require excluding arm64
architecture because configuration files generated after pod install
override your target build settings
Seems like Google is working on addressing that (issue tracker)
+1
+1 Can't run project without Rosetta. Errors on compiling Google MLKit.
+1 Can't bulid the project in M1 Macs. Same problem
+1 Can't bulid the project in Apple M1
+1 Can't build the project in Apple M1 Pro. Suggests to use Rosetta.