Installation
This guide explains how to install the Wepin React Native PIN Pad SDK.
Requirements
Android API version 24 or newer is required.
iOS version 13 or newer is required.
Storage Migration Notice (from v1.0.0)
Starting from v1.0.0, changes to the storage key system may cause previously stored data to become inaccessible.
If the existing key is determined to be invalid, stored data will be automatically reset and a new key will be generated.
If the key is valid, your data will remain unchanged.
Downgrading from v1.0.0 to an earlier version may result in loss of access to previously stored data.
How to Disable Backup (Android)
Modify your AndroidManifest.xml file:
Copy
<application
android:allowBackup="false"
android:fullBackupContent="false">
If android:allowBackup is true, the migration process may not work correctly, leading to potential data loss or storage issues.
Installation
It can be installed as an npm package.
npm install @wepin/pin-rn
peerDependencies
npm install react-native-device-info
# for ios
cd ios
pod install
Configuration
To enable OAuth login functionality, you need to configure the Deep Link Scheme.
Deep Link scheme format : wepin. + Your Wepin App ID
Android
When a custom scheme is used, Wepin PIN Pad Library can be easily configured to capture all redirects using this custom scheme through a manifest placeholder in the file build.gradle(app)
:
// For Deep Link => RedirectScheme Format : wepin. + Wepin App ID
android.defaultConfig.manifestPlaceholders = [
'appAuthRedirectScheme': 'wepin.{{YOUR_WEPIN_APPID}}'
]
iOS
You must add the app's URL scheme to the Info.plist file. This is necessary for redirection back to the app after the authentication process.
The value of the URL scheme should be 'wepin.' + your Wepin app id
.
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>unique name</string>
<array>
<string>wepin + your Wepin app id</string>
</array>
</dict>
</array>
Last updated
Was this helpful?