target 'targetPackage' do
config = use_native_modules!
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons' 👈 Add this for vector icons
RUN
cd ios && pod install && cd ..
USAGE
You would need to generate EKYC Link through the API here:
import FacekiApp from '@faceki/react-native-sdk';
import { Branding } from '@faceki/react-native-sdk/src/service/types/interfaces';
const CustomBranding:Branding ={
colors: {
primary: '#F8B427',
secondary: '#343333',
buttonColor: 'rgba(253, 181, 40, 0.10)',
success: '#59C547',
danger: '#FF3B30',
warning: '#FF9500',
info: '#5AC8FA',
light: '#F5F5F5',
dark: '#1C1C1E',
background: '#f5f5f5',
backgroundSecondary: '#eeeeee',
backgroundCaptureBtn: '#F6F6F7',
textDefault: '#444343',
textSecondary: '#3E3E3E',
fontRegular:"Inter",
fontMedium:"Inter-Medium",
fontBold:"Inter-Bold"
},
images:{
card_guidance:"", //optional
selfie_guidance:"" //optional
}
}
<>
<FacekiApp
verification_url="XXXX-XXXX-xxxX-XxXXX"
onError={(error) => { console.log("ERROR", error) }}
onComplete={(data) => {
if(data instanceof MultiDocumentKYCResponseClass){
console.log("Multi Response")
}else if(data instanceof SingleDocumentKYCResponseClass)
{
console.log("Single Response")
}
}}
resultContent={{
success:{
heading:"",
subHeading:""
},
fail:{
heading:"",
subHeading:""
}
}}
consenttermofuseLink='https://faceki.com'
logoURL='http://xyz.com/zyx.png'
skipFirstScreen={true}. // true | false (If you want to disable first getting started screen)
allowSingleOverride={false} // true | false (if you want customer to select the document)
skipGuidanceScreens={true} // true | false (if you want to hide the guidance screens)
skipResultScreen={true} // true | false (if you want to skip the result screen and manage your logic by onError or onComplete method)
singleVerificationDoc="Driving License" (If you want to verify specific document with allowSingleOverride)
branding={CustomBranding}
skipFunc={
()=>{
/// Logic To Skip SDK or Navigate
}
}
/>
</>;
NOTE:
To request camera permissions from users on iOS in a your app, you can utilize the 'react-native-permissions' package. However, for Android devices, the camera permission is by default handled by the package. https://www.npmjs.com/package/react-native-permissions
Troubleshoot
Vector icons are causing an issue in release build in version <= 9.2.0 in android. There is an ongoing discussion about it. Simple fix until new verion is released.
Go to node_modules/react-native-vector-icons/fonts.gradle