Repository navigation
[MOO-2490] : Updated vision camera to v5 & used react-native-vision-camera-barcode-scanner for barcode scanning-11-12-x - #680
Conversation
There was a problem hiding this comment.
configs/e2e/native_dependencies.json isn't updated on this branch. It still pins react-native-vision-camera 4.7.3, and scripts/test/add-native-dependencies.js merges that file into the native template's package.json for the e2e build. So the 11.12.x e2e app would be built with v4 native code and without react-native-nitro-image / react-native-vision-camera-barcode-scanner, while the widget uses the v5 API. The main PR (#681) includes this change.
|
Please check the failing GitHub Actions checks on this PR. |
…rcode-scanner-vision-camera-v5-library-migration NATIVE_DEPENDENCY_APPROVED
…rcode-scanner-vision-camera-v5-library-migration
|
Blocker: iOS simulator builds fail on Apple Silicon Macs
There is no arm64 iOS-simulator slice. Linking the arm64 slice for the arm64 simulator fails with:
Since most developers are on Apple Silicon, we can't proceed with the ML Kit-based barcode scanner on iOS in its current form. |
…rcode-scanner-vision-camera-v5-library-migration
This reverts commit a06a3c3.
Checklist
[XX-000]: description)? ✅Feature specific
This PR contains
What is the purpose of this PR?
This PR updates the react native vision camera from v4 to v5. Also uses its aligned react-native-vision-camera-barcode-scanner library on Android which is more advance and fixes the issue of scanning dense and patterned background QR codes. For IOS we are using its own built in Apple Scanner AVFFoundation.
Relevant Changes -
On Android , the barcode scanner now uses react-native-vision-camera-barcode-scanner, which brings in Google MLKit as prebuilt frameworks.
These Change is temporary and will be removed once we released the native template , as latest released native template will be used by e2e- MLKit's arm64 code is labelled for physical iPhones only, so the iOS e2e build fails at link time on our Apple Silicon CI runners, which build for an arm64 simulator: "building for 'iOS-simulator', but linking in object file ... built for 'iOS'". To fix this, the pipeline now runs scripts/test/patch-mlkit-arm64-simulator.js after pod install. The script changes the platform label on MLKit's arm64 object files from iOS to iOS simulator, which is safe because device and simulator arm64 code use the same instructions and only that label differs. xcodebuild also gets EXCLUDED_ARCHS="i386 x86_64" so Xcode builds the simulator app for arm64 only and never tries to link the unpatched x86_64 code. Without these changes the iOS app can't be built, so the iOS e2e tests can't run on this branch. The patch only touches the CI simulator build.
What should be covered while testing?
Test the given QR code in the ticket .
Test different online generated QR codes on both IOS and Android.