Dashboard

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 * as React from 'react';

import { StyleSheet, View, Button } from 'react-native';
import AppsPrize from 'appsprize-react-native';

to the import section of the files where you need to access AppsPrize's functionality like Stylesheet, View, Button.


What’s Next