vision-camera-ocr
vision-camera-ocr copied to clipboard
Cannot build on M1 - iOS Simulator
I can't build for iOS Simulator on Apple M1 chip, building for real iPhone device works without a problem.
When trying to build for simulator it will give this error:
I think that it's something with libraries used with vision-camera-ocr setting - EXCLUDED_ARCHS[sdk=iphonesimulator*] = arm64 on xcode project.
I have tried to remove arm64 exclusion but then I get this error:
building for iOS Simulator, but linking in object file built for iOS
same issue here
According to this: https://issuetracker.google.com/issues/178965151, Google still doesn't fully support MLKIT on Apple Silicon. I think this repo can't do anything.
But this works for me:
- Open Terminal with Rosetta (https://medium.com/codex/simple-way-to-use-cocoapods-on-m1-ac9e22cf7e1c)
sudo gem install ffi(dont know if its necessary)- Remove all installed pods
rm -rf ios/pods - Reinstall
pod install - Moist important: Build with rosetta