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

Failed to build in Apple M1

Open zhiying038 opened this issue 1 year ago • 4 comments

Issue: Failed to build project when running in Apple M1.

Any assistance would be appreciated.

Versions: OS Version: iOS iOS Version: 16.2 react-native: 0.71.7 react-native-vision-camera: 2.15.4 vision-camera-code-scanner: 0.2.0 react-native-reanimated: 2.10.0

Screenshot 2023-08-17 at 3 38 02 PM

zhiying038 avatar Aug 17 '23 07:08 zhiying038

I'm having almost the exact same error, but with slightly different package versions:

React-Native 0.72.4 Latest iOS React-Native-Vision-Camera 3.0.0-rc4 React-native-Reanimated: (latest) I believe 3.4.0

DeveloperMCD avatar Aug 17 '23 18:08 DeveloperMCD

You can try run xcode in rosetta.

whisperzh avatar Aug 18 '23 20:08 whisperzh

You can try run xcode in rosetta.

One plugin should not force us to run xcode in rosetta. They should add note on top of README that this plugin doesn't support arm yet, would have saved us alot of time. I work on intel but collegues on arm. So this is a big problem.

eisodev avatar Aug 30 '23 12:08 eisodev

I had the same problem, but I solved it by adding this line in the pod file of my RN project (after xcode fix):

__apply_Xcode_12_5_M1_post_install_workaround(installer)
....
# arm64 simulator EXCLUDED_ARCHS setting:
installer.pods_project.build_configurations.each do |config|
  config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end

DavideSegullo avatar Sep 19 '23 18:09 DavideSegullo