π Installation
React Native SDK
By running it as follows through NPM or Yarn, you can install the React Native SDK.
# NPM
npm install --save @haechi-labs/face-react-native-sdk
β
# Yarn
yarn add @haechi-labs/face-react-native-sdk
β
# For iOS
cd ios
β pod installFace Types
Types is a package in which various types required for using Face are defined. By running it as follows through NPM or Yarn, you can install Face Types.
# NPM
npm install --save @haechi-labs/face-types
# Yarn
yarn add @haechi-labs/face-typesPeer Dependency
Face React Native SDK needs some peer dependencies.
# NPM
npm install --save react-native-device-info
npm install --save react-native-get-random-values
npm install --save react-native-inappbrowser-reborn
# Yarn
yarn add react-native-device-info
yarn add react-native-get-random-values
yarn add react-native-inappbrowser-rebornFor iOS
For iOS, you need to execute the following commands:
cd ios
pod installFor Android
Face React Native SDK use Chrome Custom Tabs as Safe Browsing mode. So, in order to receive the response from Face Wallet webview, you need to add the your app scheme to AndroidManifest.xml. The scheme will be passed when Face Wallet is initialized.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="your.app.package.name">
<application ...>
<activity ...>
...
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="CUSTOM_SCHEME" android:host="CUSTOM_SCHEME" />
</intent-filter>
...
</activity>
</application>
</manifest>Updated 8 days ago