README
react-native-appsmiles-apmservices
Getting started
$ npm install react-native-appsmiles-apmservices --save
Mostly automatic installation
$ react-native link react-native-appsmiles-apmservices
iOS
- Add
Podfile
in folderios
- Add
pod 'APMServices', '~> 2.1.2'
- Launch the command line
pod install
Android
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-appsmiles-apmservices')
- In global
android/build.gradle
allprojects { repositories { //... maven { url 'https://dl.bintray.com/moonmiles/appsmiles' } } }
- Init the SDK
APMServicesPublic.sharedInstance(this); //Init in MainApplication.java and main thread
in the methodonCreate()
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-appsmiles-apmservices
and addRCTAPMServices.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRCTAPMServices.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Add
Podfile
in folderios
- Add
pod 'APMServices', '~> 2.1.2'
- Launch the command line
pod install
Android
- Open up
android/app/src/main/java/[...]/MainApplication.java
- Add
import com.moonmiles.APMReactPackage;
andimport com.moonmiles.apmservices.sdk.APMServicesPublic;
to the imports at the top of the file - Add
new APMReactPackage()
to the list returned by thegetPackages()
method - Append the following lines to
android/settings.gradle
:include ':react-native-appsmiles-apmservices' project(':react-native-appsmiles-apmservices').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-appsmiles-apmservices/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-appsmiles-apmservices')
- In global
android/build.gradle
allprojects { repositories { //... maven { url 'https://dl.bintray.com/moonmiles/appsmiles' } } }
- Init the SDK
APMServicesPublic.sharedInstance(this); //Init in MainApplication.java and main thread
in the methodonCreate()
Usage
import {
APMServicesModule,
APMServicesConfigModule,
APMServicesAdModule,
APMServicesGenerosityModule,
APMServicesGiftModule,
APMServicesLogModule,
APMServicesPageModule,
APMServicesPartnerModule,
APMServicesStatisticModule,
APMServicesStoreModule,
APMServicesUserModule
} from 'react-native-appsmiles-apmservices';