Summary
On Apple Silicon Macs, @infinitered/react-native-mlkit-face-detection transitively pulls in GoogleMLKit/FaceDetection versions that ship as classic fat .framework bundles (arm64 = device-only, no arm64-simulator slice). CocoaPods injects EXCLUDED_ARCHS[sdk=iphonesimulator*] = arm64 into the host app's xcconfig to compensate, which forces the iOS simulator to build as x86_64 and run under Rosetta translation.
In that Rosetta-translated simulator, PHPickerViewController (the system image picker) is unreliable — the XPC plugin crashes on open, reproducibly:
[PlugInKit] [com.apple.mobileslideshow.photospicker(1.0)] Connection to plugin interrupted while in use.
[PlugInKit] [com.apple.mobileslideshow.photospicker(1.0)] Connection to plugin invalidated while in use.
[PhotosUI] Showing picker unavailable UI (reason: crashed) with error: (null)
The picker UI renders thumbnails then becomes fully unresponsive to touch. Running on a physical device works fine.
Repro / Evidence
@infinitered/react-native-mlkit-face-detection@5.0.0
@infinitered/react-native-mlkit-core@5.0.0
- CocoaPods resolves transitively to:
GoogleMLKit/FaceDetection (~> 7.0.0)
MLKitFaceDetection (~> 5.0.0)
MLKitCommon (~> 11.0.0)
MLKitVision (~> 7.0)
Pods-*.debug.xcconfig contains EXCLUDED_ARCHS[sdk=iphonesimulator*] = arm64
Removing the exclusion to try arm64 simulator produces the expected linker error:
ld: building for 'iOS-simulator', but linking in object file
(Pods/MLImage/Frameworks/MLImage.framework/MLImage[arm64][2](GMLImage.o))
built for 'iOS'
...confirming the arm64 slice in the fat framework is device-only, not simulator.
Environment
- Expo SDK 55, React Native 0.83.4, Hermes, Fabric enabled
- macOS arm64 (Apple Silicon, native — not under Rosetta)
- Xcode 16, iOS 18.6 simulator
Request
Google now publishes MLKit pods as proper .xcframework bundles with dedicated ios-arm64-simulator slices in newer releases. Could the podspecs in this repo (RNMLKitFaceDetection.podspec, RNMLKitCore.podspec) be updated to depend on GoogleMLKit versions that ship xcframeworks? That would remove the need for EXCLUDED_ARCHS = arm64 and let consumers build the simulator natively on Apple Silicon, avoiding the Rosetta + PHPicker failure mode.
Summary
On Apple Silicon Macs,
@infinitered/react-native-mlkit-face-detectiontransitively pulls inGoogleMLKit/FaceDetectionversions that ship as classic fat.frameworkbundles (arm64 = device-only, no arm64-simulator slice). CocoaPods injectsEXCLUDED_ARCHS[sdk=iphonesimulator*] = arm64into the host app's xcconfig to compensate, which forces the iOS simulator to build as x86_64 and run under Rosetta translation.In that Rosetta-translated simulator,
PHPickerViewController(the system image picker) is unreliable — the XPC plugin crashes on open, reproducibly:The picker UI renders thumbnails then becomes fully unresponsive to touch. Running on a physical device works fine.
Repro / Evidence
@infinitered/react-native-mlkit-face-detection@5.0.0@infinitered/react-native-mlkit-core@5.0.0GoogleMLKit/FaceDetection (~> 7.0.0)MLKitFaceDetection (~> 5.0.0)MLKitCommon (~> 11.0.0)MLKitVision (~> 7.0)Pods-*.debug.xcconfigcontainsEXCLUDED_ARCHS[sdk=iphonesimulator*] = arm64Removing the exclusion to try arm64 simulator produces the expected linker error:
...confirming the arm64 slice in the fat framework is device-only, not simulator.
Environment
Request
Google now publishes MLKit pods as proper
.xcframeworkbundles with dedicatedios-arm64-simulatorslices in newer releases. Could the podspecs in this repo (RNMLKitFaceDetection.podspec,RNMLKitCore.podspec) be updated to depend on GoogleMLKit versions that ship xcframeworks? That would remove the need forEXCLUDED_ARCHS = arm64and let consumers build the simulator natively on Apple Silicon, avoiding the Rosetta + PHPicker failure mode.