react-native-xpago-maquineta
v1.0.7
Published
## Getting started
Downloads
5
Readme
react-native-xpago-maquineta
Getting started
$ npm install react-native-xpago-maquineta --save
/home/afa/Documents/code/codificar/rn-packages/xpago_maquineta
Mostly automatic installation
$ react-native link react-native-xpago-maquineta
Manual installation
iOS
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-xpago-maquineta
and addRNXpagoMaquineta.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNXpagoMaquineta.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)<
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import br.com.codificar.xpago_maquineta.RNXpagoMaquinetaPackage;
to the imports at the top of the file - Add
new RNXpagoMaquinetaPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-xpago-maquineta' project(':react-native-xpago-maquineta').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-xpago-maquineta/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-xpago-maquineta')
Usage
import RNXpagoMaquineta from 'react-native-xpago-maquineta';
// TODO: What to do with the module?
RNXpagoMaquineta.startPayment();
//b
RNXpagoMaquineta.printOnMachine();
// a
RNXpagoMaquineta.getDeviceInfo();