React Native
1. The following values have been renamed:
InitializationConfiguration
→InitConfig
FaceSDK.presentFaceCaptureActivity()
→FaceSDK.startFaceCapture()
FaceSDK.matchFacesSimilarityThresholdSplit()
→FaceSDK.splitComparedFaces()
MatchFacesSimilarityThresholdSplit
→ComparedFacesSplit
*.bitmap
→*.image
2. Added missing classes, such as InitResponse
and LivenessConfig
.
3. Reworked functions that had similar versions accepting a configuration object, such as FaceSDK.initialize()
and FaceSDK.initializeWithConfig(config: any)
.
Now, it is a single function that can accept null
instead of a configuration object:
FaceSDK.initialize(null, _ => {}, _ => {})
FaceSDK.initialize({}, _ => {}, _ => {})
FaceSDK.initialize({
license: "base64"
}, _ => {}, _ => {})
var config = new InitConfig()
config.license = "base64"
FaceSDK.initialize(config, _ => {}, _ => {})
4. Functions FaceSDK.setUiCustomizationLayer(any)
and FaceSDK.setUiConfiguration(any)
are combined into FaceSDK.setCustomization(customization: Customization)
.
5. Callbacks for synchronous functions without a return value have been disabled, as they don't return anything.
The full list of functions with disabled successCallback
:
setServiceUrl
setLocalizationDictionary
setRequestHeaders
setCustomization
deinitialize
stopFaceCapture
stopLiveness
6. Due to the current architecture design, you still need to pass a callback as a function parameter. However, you can use an empty callback _ => { }
as it will never be executed. Here is a comparative example:
FaceSDK.setLocalizationDictionary(dictionary, result => {
console.log("Localization dictionary applied!")
}, error => { })
FaceSDK.setLocalizationDictionary(dictionary, _ => { }, _ => { })
console.log("Localization dictionary applied!")