reactReact Native

Get Started

1

Set up your adjoe App

Share the following information with your adjoe Account Manager:

  • App bundle IDs

  • App Store ID / Playstore ID

Your Account Manager will share:

  • SDKHash

  • S2S Token

  • API Token

circle-check
2

Install the dependency

Follow these steps to integrate the adjoe React Native module into your project:

  1. Open your project's package.json file.

  2. Add the adjoe as a dependency under the dependencies section. You can change the version number to the desired version of adjoe SDK you want to integrate.

dependencies: {
  "react-native-adjoe-sdk": "https://github.com/adjoeio/adjoe-react-native-sdk#v4.2.0"
}

Alternatively, you can use your project's package managers to perform the installation:

  • npm install --save https://github.com/adjoeio/adjoe-react-native-sdk#4.2.0

  • yarn add https://github.com/adjoeio/adjoe-react-native-sdk#4.2.0

The package doesn't support Expo by default. To install it in an Expo project, see the official documentation on installing third-party packagesarrow-up-right.

3

iOS: Add the Native Dependency

CocoaPodsarrow-up-right is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website.

  1. In your project directory, create a Podfile if one doesn’t already exist.

  2. Inside the Podfile, add the following configuration to include the Playtime SDK as a dependency within your app’s target. You can also specify a version or version range—see the CocoaPods Podfile syntax reference for more details.

    source 'https://github.com/adjoeio/PlaytimeSpecExternal.git'
    
    platform :ios, '14.0'
    
    target 'MyApp' do
      use_frameworks!
    
      pod 'PlaytimeMonetize', '~> 4.2.0'
    end
  3. Open a terminal and navigate to your project’s root directory.

  4. Run the following command to update the CocoaPods repository and install the dependencies:

    pod install --repo-update
  5. Once installation is complete, open the .xcworkspace file generated by CocoaPods. The Playtime SDK will now be available for use within your project.

Check out our troubleshooting guide if you run into any issues with Cocoapods

4

iOS: Integrate App Attest

Check the steps here to Integrate App Attest. Failure to set up App Attest as intended will cause issues with the app set up and may cause the app to be rejected.

5

Android: Add the Native Dependency

  1. Add adjoe's repository to your root build.gradle (project level):

allprojects {
    repositories {
        ...
        maven {
            url  "https://releases.adjoe.io/maven"
        }
    }
}
  1. Add the adjoe dependency to your app's build.gradle (module level):

dependencies {
    ...
    implementation 'io.adjoe:adjoe-sdk-android:4.2.0'
}

If you use Kotlin DSL for adding dependencies, add the repo in the settings.gradle.kts

repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        maven { url = uri("https://releases.adjoe.io/maven") }
    }
}

Last updated