wrenchCustom Configuration

Learn how to tailor ContextSDK settings to suit your app's unique needs.

ContextSDK operates seamlessly in the background, designed from the ground up to minimize resource usage and have no impact on your app’s performance. For most use cases, we recommend keeping the default settings unless you have specific requirements.

If needed, you can customize these options by passing a Configuration object to the applicationDidFinishLaunchingWithOptions method, as seen here:

AppDelegate.swift
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    //
    let config = Configuration()
    ContextManager.applicationDidFinishLaunchingWithOptions(launchOptions, licenseKey: "YOUR_LICENSE_KEY", configuration: config)
    //
}

Configuration Options

App Group Identifier

circle-info

Required for ContextPush reporting because the Notification Service Extension relies on App Group data sharing.

The appGroupIdentifier enables data sharing between your main app and a Notification Service Extension. This allows the extension to verify your license and share user preferences.

let config = Configuration(appGroupIdentifier: "group.com.yourcompany.yourapp")

Requirements:

  • Both main app and extension must have the App Groups capability enabled

  • Both must use the same App Group identifier

  • The main app must be launched at least once after configuration to initialize shared data

See Notification Service Extension for complete setup instructions.


For a comprehensive list of all configuration options, please refer to our iOS SDK Reference (Configuration)arrow-up-right.

Last updated

Was this helpful?