The guides below are provided to ease the transition of existing applications using the Onfido React Native SDK from one version to another that introduces breaking API changes.
If your migration involves upgrading across multiple SDK versions, be sure to read each individual guide in order to account for all relevant breaking changes.
- Extra customization was introduced to the Capture Face step (for more information, see our readme file). A breaking change was introduced when defining the fallbacks for a Motion type face capture, you can see from the example below how to update.
Before 9.0.0:
config = {
sdkToken: “EXAMPLE-TOKEN-123”,
flowSteps: {
welcome: true,
...
captureFace: {
type: OnfidoCaptureType.MOTION,
options: VIDEO_CAPTURE_FALLBACK
},
},
}
After 9.0.0:
config = {
sdkToken: “EXAMPLE-TOKEN-123”,
flowSteps: {
welcome: true,
...
captureFace: {
type: OnfidoCaptureType.MOTION,
motionCaptureFallback: {
type: OnfidoCaptureType.PHOTO
},
},
},
}
- In fact,
options
key was entirely removed fromcaptureFace
.captureFace
can be one of the 3 following types:
type OnfidoFaceSelfieCapture = {
type: OnfidoCaptureType.PHOTO;
showIntro?: boolean
};
type OnfidoFaceVideoCapture = {
type: OnfidoCaptureType.VIDEO;
showIntro?: boolean;
showConfirmation?: boolean;
manualVideoCapture?: boolean;
};
type OnfidoFaceMotionCapture = {
type: OnfidoCaptureType.MOTION;
recordAudio?: boolean;
motionCaptureFallback?: OnfidoFaceSelfieCapture | OnfidoFaceVideoCapture;
};
- Near Field Communication (NFC) is now enabled by default and offered to customers when both the document and the device support NFC. To disable NFC, please refer to our NFC reference guide.