target 'targetPackage' do
config = use_native_modules!
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
end
RUN
cd ios && pod install && cd ..
USAGE
import FacekiApp from '@faceki/blaze-react-native';
<>
<FacekiApp
clientId="######################"
clientSecret="######################"
onError={onError}
onComplete={onComplete}
workflowId={"XXXX-XXXX-xxxX-XxXXX"} // get it from portal
record_identifier="unique-id-from-your-side"
/>
</>;
Advance Usage
import FacekiApp from '@faceki/blaze-react-native';
import { Branding } from '@faceki/blaze-react-native/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
clientId={"########"}
clientSecret={"############"}
workflowId={"XXXX-XXXX-xxxX-XxXXX"} // get it from portal
record_identifier="unique-id-from-your-side"
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)
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)
branding={CustomBranding}
/>
</>;
NOTE:
To request camera permissions from users on iOS in your app, you can utilize the 'react-native-permissions' package. However, for Android devices, the camera permission is by default handled by the package. react-native-permissions
Troubleshoot
Vector icons are causing an issue in the release build in version <= 9.2.0 in android. There is an ongoing discussion about it. Simple fix until the new version is released.
Go to node_modules/react-native-vector-icons/fonts.gradle