Setting Up the SDK
Adding the SDK to Your Application
For the first step, you need to download the latest version of AppsPrize SDK for the React Native here.
Secondly, you need to run the command npm install appsprize-react-native
or yarn install appsprize-react-native
in your app's root directory in order to add the AppsPrize SDK to your app.
Lastly, declare the dependency for the AppsPrize SDK in your app’s module Gradle file (usually app/build.gradle
).
AppsPrize SDK targets Android API level 23 (Android 6.0, Marshmallow) or higher.
Please note that you need to add Java 1.8 compatibility configuration as well. In your app’s module Gradle file (usually
app/build.gradle
), please add the following instructions:android { compileOptions { // You should add these two lines sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } }
Importing
You can import the SDK's functions by adding
import AppsPrize from 'appsprize-react-native';
to the import section of the files where you need to access AppsPrize's functions.
Updated 8 days ago