ReactNative
Only supports Android and iOS
Only supports Android and iOS
Execute the following command in the root directory of your React Native project:
npm install --save react-native-trustdeviceAndroid: In the build.gradle of the application module, declare SDK package dependencies.
dependencies {
...
implementation 'com.trustdecision.android:apisign:1.1.3'
}iOS: Install(CocoaPods)
pod 'TrustDecisionAPISign', '1.1.1' to the corresponding target in the Podfile.pod install --repo-update command in the folder containing the Podfile (For M1-series Mac computers, execute the command arch -x86_64 pod install --repo-update).Invoke the plugin's sign method at the actual business node to sign the URL that requires signing.
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
*/
import React, { useState } from 'react';
import {
StyleSheet,
Text,
View,
Button,
} from 'react-native';
// import the plugin
import { NativeModules } from 'react-native';
const TrustDevice = NativeModules.TrustDevice;
If Android requires using ProGuard for obfuscation packaging, please add the following code to the ProGuard configuration file:
-keep class com.trustdecision.**{*;}