$ npm install react-native-braintree --save
$ react-native link react-native-braintree
- In XCode, in the project navigator, right click
Libraries➜Add Files to [your project's name] - Go to
node_modules➜react-native-braintreeand addRNBraintree.xcodeproj - In XCode, in the project navigator, select your project. Add
libRNBraintree.ato your project'sBuild Phases➜Link Binary With Libraries - Run your project (
Cmd+R)<
- Append the following lines to
android/settings.gradle:include ':react-native-braintree' project(':react-native-braintree').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-braintree/android') - Insert the following lines inside the dependencies block in
android/app/build.gradle:implementation(project(':react-native-braintree'))
import RNBraintree from 'react-native-braintree';
// TODO: What to do with the module?
RNBraintree;