@soyio/soyio-rn-sdk-native-disclosure
v6.0.4
Published
Native disclosure addon for the Soyio React Native SDK
Readme
@soyio/soyio-rn-sdk-native-disclosure
Optional native disclosure addon for @soyio/soyio-rn-sdk.
Install this package alongside the core SDK only if your disclosure flow requires the native FaceTec-backed experience.
Installation
# Using npm
npm install @soyio/soyio-rn-sdk @soyio/soyio-rn-sdk-native-disclosure
# Using yarn
yarn add @soyio/soyio-rn-sdk @soyio/soyio-rn-sdk-native-disclosureAfter installing on iOS, run:
cd ios && pod installAndroid Setup
Add the addon AAR repository to android/settings.gradle:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
repositories {
flatDir {
dirs(
"$rootDir/../node_modules/@soyio/soyio-rn-sdk-native-disclosure/android/libs",
)
}
}
}Add the required manifest entries inside android/app/src/main/AndroidManifest.xml:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" android:required="true" />If your disclosure flow requires NFC, also add:
<uses-permission android:name="android.permission.NFC" />
<uses-feature android:name="android.hardware.nfc" android:required="false" />iOS Setup
Add the required purpose string to ios/YourApp/Info.plist:
<key>NSCameraUsageDescription</key>
<string>This app needs access to camera for document verification</string>If your disclosure flow requires NFC, also add:
<key>NFCReaderUsageDescription</key>
<string>This app needs access to NFC for identity document verification</string>
<key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>
<array>
<string>A0000002471001</string>
<string>A0000002472001</string>
</array>For NFC support, create or update ios/YourApp/YourApp.entitlements:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.developer.nfc.readersession.formats</key>
<array>
<string>TAG</string>
</array>
</dict>
</plist>Then add the Near Field Communication Tag Reading capability in Xcode and point Build Settings -> Code Signing Entitlements at that entitlements file.
Apple Silicon Simulator Compatibility
The podspec for this addon is already configured to handle Apple Silicon simulators by excluding the arm64 architecture for simulator builds. However, if you encounter linker issues on an Apple Silicon Mac, you can manually add the following to your app's Podfile:
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == 'soyio_rn_sdk_native_disclosure'
target.build_configurations.each do |config|
config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64'
end
end
end
end