Installation

Requirements

  • React Native version 0.71.8 or higher

Installation

Here is how to install the Wepin React Native SDK.

Install Wepin

The Wepin React Native SDK can be installed via npm package.

npm install @wepin/react-native-sdk

peerDependencies

npm install react-native-device-info
npm install react-native-inappbrowser-reborn
npm install react-native-webview
npm install react-native-encrypted-storage
npm install react-native-permissions
npm install @react-native-clipboard/clipboard

# for ios
cd ios
pod install

or

Additional Installation (version 0.0.7-alpha or higher)

To use the provider feature in a React Native environment, you need to install the additional package and initialize it as follows.

or

Additionally, you need to add the rn-nodeify command to the postinstall script in the package.json file as follows.

After running the postinstall script, you need to import the generated shim.js file into the root file of your application.

For iOS

Modify AppDelegate.mm

You need to add the following code to AppDelegate.mm.

Modify Info file

In Xcode, you need to register URL Schemes in the Info file.

Select the Info tab in the project. Click on + in URL Types to add Identifier and URL Schemes.

The identifier is your App Bundle ID. The value of URL Schemes should be your wepin. + wepin app id.

Correct usage of the deep link scheme value is essential for utilizing Wepin widget functionality. Please apply the new scheme value for the proper operation of the Wepin widget.

Add Permission (from v0.0.20-alpha and above.)

To use this SDK, camera access permission is required. The camera functionality is essential for recognizing addresses in QR code format. [Refer to: react-native-permission]

Modify Podfile

To set permissions, you need to configure the setup script in the Podfile.

You need to add camera permission to setup_permission.

Modify Info.plist

For Android

Modify AndroidManifest

To use Wepin in your app, you need to modify the AndroidManifest.xml file of your app.

You need to add an intent filter for the Wepin activity in your app's AndroidManifest.xml. The schema value you add should be wepin. + wepin app id.

Release

Add Permission (from v0.0.20-alpha and above.)

To use this SDK, camera access permission is required. The camera functionality is essential for recognizing addresses in QR code format. [Refer to: react-native-permission]

To use Wepin, add the following permissions to the main Activity of your app.

Release

The released package versions can be found on the GitHub repository below.

Last updated

Was this helpful?