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
In order to fully test all of the features before going live, ensure that a Sandbox application is created for your account.
If you have multiple application IDs, you should ensure that each one has a separate SDK Hash. Failure to use the right SDK hash with the associated ID will cause errors when building the SDK.
2
Install the dependency
Follow these steps to integrate the adjoe React Native module into your project:
Open your project's package.json file.
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.
The package doesn't support Expo by default. To install it in an Expo project, see the official documentation on installing third-party packages.
3
iOS: Add the Native Dependency
CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website.
In your project directory, create a Podfile if one doesn’t already exist.
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
Open a terminal and navigate to your project’s root directory.
Run the following command to update the CocoaPods repository and install the dependencies:
pod install --repo-update
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.
Note: The SDK is designed to be integrated on both Android and iOS. Upgrading only one platform is not recommended, as it may lead to unexpected behavior.
Should there be a need to upgrade Android only while maintaining a different implementation on iOS (e.g. Web), you must disable iOS Autolinking to prevent the iOS SDK from initializing unintentionally.
Please follow the steps below to disable Autolinking. If you encounter any issues during integration, contact your Account Manager.
Step 1: Update react-native.config.js
In your project root directory, edit (or create) the react-native.config.js file and add the following:
module.exports = {
dependencies: {
'react-native-adjoe-sdk': {
platforms: {
ios: null, // This disables autolinking for iOS only
},
},
},
}
Step 2: Update CocoaPods
Navigate to your ios directory and reinstall your dependencies to apply the changes:
Bash
cd ios && pod install
Step 3: Clean Up (Existing Integrations Only)
If you have previously tested or integrated the adjoe iOS SDK in this project, perform these steps to ensure a clean state:
Remove any redundant adjoe-playtime.plist files from the Xcode project.