vision-camera-code-scanner icon indicating copy to clipboard operation
vision-camera-code-scanner copied to clipboard

Cannot compile for M1 simulators

Open bsmayer opened this issue 2 years ago • 9 comments

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 avatar Mar 04 '22 00:03 bsmayer

@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

pmarconi avatar Mar 04 '22 16:03 pmarconi

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.

chiubaka avatar Mar 28 '22 00:03 chiubaka

@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 ?

lukasa1993 avatar Aug 06 '22 15:08 lukasa1993

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)

iharabukhouski avatar Aug 13 '22 23:08 iharabukhouski

+1

Mura7 avatar Jan 03 '23 11:01 Mura7

+1 Can't run project without Rosetta. Errors on compiling Google MLKit.

teendream avatar Jan 18 '23 05:01 teendream

+1 Can't bulid the project in M1 Macs. Same problem

felipejoribeiro avatar Apr 14 '23 12:04 felipejoribeiro

+1 Can't bulid the project in Apple M1

imransilvake avatar Sep 17 '23 15:09 imransilvake

+1 Can't build the project in Apple M1 Pro. Suggests to use Rosetta.

Anokhi1994 avatar Sep 23 '23 10:09 Anokhi1994