1.0.0 • Published 4 years ago
react-native-kbzpay-sdk v1.0.0
react-native-kbzpay-sdk
Getting started
$ npm install react-native-kbzpay-sdk --save
Mostly automatic installation
$ react-native link react-native-kbzpay-sdk
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-kbzpay-sdk
and addRNKbzpaySdk.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNKbzpaySdk.a
to your project'sBuild Phases
➜Link Binary With Libraries
- In info.plist, add
kbzpay-cb-scheme
key and your app scheme string as value - Run your project (
Cmd+R
)<
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.reactlibrary.RNKbzpaySdkPackage;
to the imports at the top of the file - Add
new RNKbzpaySdkPackage()
to the list returned by thegetPackages()
method
- Add
- Append the following lines to
android/settings.gradle
:include ':react-native-kbzpay-sdk' project(':react-native-kbzpay-sdk').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-kbzpay-sdk/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-kbzpay-sdk')
Windows
- In Visual Studio add the
RNKbzpaySdk.sln
innode_modules/react-native-kbzpay-sdk/windows/RNKbzpaySdk.sln
folder to their solution, reference from their app. - Open up your
MainPage.cs
app- Add
using com.jarplay.Kbzpay.Sdk.RNKbzpaySdk;
to the usings at the top of the file - Add
new RNKbzpaySdkPackage()
to theList<IReactPackage>
returned by thePackages
method
- Add
Usage
import RNKbzpaySdk from 'react-native-kbzpay-sdk';
// TODO: What to do with the module?
RNKbzpaySdk;
1.0.0
4 years ago