This is the core functionality of the Contextual iOS SDK.

Registering an install of your app with the Contextual server is required for all functionality of the Contextual SDK to excecute correctly.

The registration of the install is required to happen on each load of the app and as such should occur during launch of the application, usually in the following function which is typically overridden in your AppDelegate:

func application(_ application: UIApplication,    
                   didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool

On first launch of your app it will register an "install" with our server and on subsequent launches it will register an "update" to that existing install with any details that might have changed since last update (e.g. iOS version installed on the device).

Method Description
registerInstallForApp Registers the installation of the app with the specified appKey with the Contextual server

The parameters of this method are as follows:

Parameter Description
appKey The app key that you have registered on the Contextual Dashboard for this app
isDebugMode Whether the Contextual SDK should show debug logs to the console during development. This is generally advised to be TRUE during development and FALSE for release builds
completion A block which will execute on completion of the registration of the app with the Contextual server

Last update: 2024-01-30