@smileid/usesmileid_vision_face
v12.1.1
Published
Apple Vision face detection implementation for the UseSmileID React Native (Expo) SDK.
Readme
@smileid/usesmileid_vision_face
UseSmileID v12 — Apple Vision face provider for React Native (Expo Modules).
iOS-only. Thin shim around the existing Swift Package
UseSmileIDVisionFace.
Architecture
The native side runs the entire face-scan pipeline (analyzer +
validator + transitioner + state machine). This package contributes a
Swift Expo Module that constructs UseSmileIDFaceSession(FaceDetectorAnalyzer())
and a TS wrapper that bridges the four contract methods (configure /
analyze / reset / close) with Zod-validated wire payloads.
No ML logic is reimplemented in this package — it's a pure passthrough.
Installation
pnpm add @smileid/usesmileid_vision_face react-native-vision-camera@^4This package's pod depends on VisionCamera: without it pod install fails
with Unable to find a specification for VisionCamera depended upon by
UseSmileIDVisionFaceExpo. Pin v4 — the SDK is built against the v4
API, and a bare expo install react-native-vision-camera resolves a v5.
Run npx pod-install (or let Expo's prebuild handle it) so the iOS
project picks up the SPM dependency declared in
UseSmileIDVisionFace.podspec.
Config plugin options
| Option | Values | Default |
| ------------------------- | ------------------------ | -------- |
| iosSignatureAggregation | "keep" | "disabled" | "keep" |
Several targets have to reference the same signed Smile ID XCFramework, and an
iOS release archive collects framework signatures into one directory keyed by
filename — so "keep" adds a build phase that leaves exactly one staged copy of
each signature while the archive is assembled.
"disabled" instead turns off Xcode's signature aggregation for the app target.
Reach for it only if an Xcode version we have not seen still fails to archive:
it drops the recorded signatures of every framework in the archive, including
your own and other vendors'.
{
"plugins": [
[
"@smileid/usesmileid_vision_face",
{ "iosSignatureAggregation": "disabled" }
]
]
}Usage
import { useSmileIDVisionFace } from "@smileid/usesmileid_vision_face";
await useSmileIDVisionFace.configure({ selfieCaptureTimeoutMs: 60_000 });
const result = await useSmileIDVisionFace.analyze(bytes, rotation);
await useSmileIDVisionFace.close();Cross-platform peers
| Platform | Provider package | Native dep |
| ---------------- | --------------------------------- | ---------------------------- |
| iOS | @smileid/usesmileid_vision_face | UseSmileIDVisionFace (SPM) |
| Android | @smileid/usesmileid_mlkit_face | com.usesmileid:mlkit-face |
| Android (no GMS) | @smileid/usesmileid_huawei_face | com.usesmileid:huawei-face |
Testing
pnpm --filter @smileid/usesmileid_vision_face test