All work
Contributor · Open source · Sept 2026

Replacing ML Kit with Apple Vision for iOS face detection

Replaced the iOS ML Kit dependency in react-native-vision-camera-face-detector with Apple Vision to resolve the arm64 iOS Simulator limitation while keeping Android on ML Kit.

React NativeSwiftApple VisioniOSML KitAndroid

THE PROBLEM

The iOS ML Kit dependency limited face detection on the arm64 iOS Simulator. The library needed an iOS implementation that addressed this limitation while preserving its existing API shape and Android implementation.

APPROACH

  • Replaced the iOS ML Kit dependency with Apple Vision.
  • Updated face landmarks, pose angles, camera orientation, and static-image detection.
  • Kept Android on ML Kit and preserved the public API shape.

WHAT WAS HARD

  • Accounting for differences between Apple Vision and ML Kit detection outputs.
  • Preserving the API shape while documenting platform-specific behavior: iOS eye-open probability is estimated, while smile probability and tracking IDs are unavailable.

IMPACT

  • The Apple Vision implementation was merged in PR #248.
  • Resolved the arm64 iOS Simulator limitation caused by the iOS ML Kit dependency.
  • Retained the Android ML Kit implementation and documented iOS compatibility limits.

SEE IT LIVE

Merged PR #248