React Native wrapper for AppSignatureHelper. AppSignatureHelper can be used for Computing your app's hash string which is required in SMS Retriever API.
$ npm install react-native-app-signature-helper --save
$ react-native link react-native-app-signature-helper
- Open up `android/app/src/main/java/[...]/MainApplication.java
- Add
import com.rnappsignaturehelper.RNAppSignatureHelperPackage;
to the imports at the top of the file - Add
new RNAppSignatureHelperPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-app-signature-helper' project(':react-native-app-signature-helper').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-app-signature-helper/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-app-signature-helper')
import RNAppSignatureHelper from 'react-native-app-signature-helper';
RNAppSignatureHelper.getAppSignature().then(function(hashedAppSignature) {
console.log(hashedAppSignature);
})