Installation
This guide explains how to install the Wepin React Native Widget SDK.
Requirements
React Native: version 0.71.8 or higher
Android: API version 24 or higher
iOS: Version 13.0 or higher
Installation
It can be installed as an npm package.
npm install @wepin/sdk-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 Widget 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?