vision-camera-ocr icon indicating copy to clipboard operation
vision-camera-ocr copied to clipboard

Cannot build on M1 - iOS Simulator

Open qkqk opened this issue 3 years ago • 3 comments

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:

Screenshot 2022-03-22 at 21 35 43

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

qkqk avatar Mar 22 '22 20:03 qkqk

same issue here

houabdu avatar Aug 22 '22 05:08 houabdu

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:

  1. Open Terminal with Rosetta (https://medium.com/codex/simple-way-to-use-cocoapods-on-m1-ac9e22cf7e1c)
  2. sudo gem install ffi (dont know if its necessary)
  3. Remove all installed pods rm -rf ios/pods
  4. Reinstall pod install
  5. Moist important: Build with rosetta

houabdu avatar Aug 22 '22 05:08 houabdu