Skip to content

Context Decision

Context Decision helps you increase your app's revenue by showing the right prompts and messages at the right time.

Overview

  • Step 1: Add ContextSDK to your app
  • Step 2: Ship app to the App Store in Calibration Mode
  • Step 3: Once enough data is collected, you can start making decisions based on the SDK's predictions

Impact on your app

Less than 0.2% CPU Usage

0.6 MB Memory Usage

Adds less than 700kb to your app's binary size

No PII processed or stored

Installation

Add the following dependency to your Podfile and run pod install

pod 'ContextSDK'

  1. Download the latest release: https://storage.googleapis.com/de73e410-context-sdk-releases/latest/ContextSDK.zip
  2. Drag & Drop the ContextSDK.xcframework folder into the Xcode file list
  3. Go to your project settings, scroll down to Frameworks, Libraries, and Embedded Content, add ContextSDK.xcframework, and select Embed & Sign

If you want to download a specific version, you can replace latest with the desired version number, e.g. https://storage.googleapis.com/de73e410-context-sdk-releases/3.1.0/ContextSDK.zip

Add https://github.com/context-sdk/context-sdk-releases as dependency.

Step 1: Choose your preferred package manager:

npm install react-native-context-sdk@latest
yarn add react-native-context-sdk

Step 2: Ensure minimum Deployment Target

ContextSDK requires a minimum deployment target of iOS 14.0, be sure to update your ios/Podfile to specify 14.0 or higher:

platform :ios, '14.0'
  1. Download the latest version of ContextSDK: https://storage.googleapis.com/de73e410-context-sdk-releases/latest/ContextSDK.zip
  2. Drag & drop the ContextSDK.xcframework into the Assets/Plugins/iOS folder of your Unity project
  3. Add the ContextSDKBinding.cs script next to it

License Key

After you installed ContextSDK, you need to add your license key. Register here to get started.

In your willFinishLaunchingWithOptions: (or anywhere before you access the SDK) setup the ContextManager:

AppDelegate.swift
import ContextSDK
AppDelegate.swift willFinishLaunchingWithOptions:
ContextManager.setup("YOUR_LICENSE_KEY")
  1. Create a new custom Swift class named AppDelegate.swift
    AppDelegate.swift
    import ContextSDK
    
    class AppDelegate: NSObject, UIApplicationDelegate {
        func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
            ContextManager.setup("YOUR_LICENSE_KEY")
            return true
        }
    }
    
  2. In your App scene UIApplicationDelegateAdaptor property wrapper
    struct YourApp: App {
        @UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
        // ...
    }
    

Call the following code on app start:

import { setup } from 'react-native-context-sdk';

void setup("YOUR_LICENSE_KEY_HERE");

In the Start() of a MonoBehaviour that is run early in your game (or anywhere before you access the SDK) setup the ContextManager:

InitContextSDK.cs
using static ContextSDKBinding;

public class InitContextSDK : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        ContextSDKBinding.SetupWithAPIBackend("YOUR_LICENSE_KEY");
    }
}

Get Started with Context Decision

Choose your platform to get started:

  Swift

  Android (coming soon)

  Unity

  React Native