Add SDK Initialization Code

Initialize the Core SDK

Initializing the SDK (see references to CTXMAMCore in example)

  • Open the AppDelegate file.
  • Import: CTXMAMCore.
  • Derive from: CTXMAMCoreSdkDelegate.
  • Set the delegate: CTXMAMCore.setDelegate(self).
  • Initialize the SDK: CTXMAMCore.initializeSDKs().
  • Build

Objective-C:

#import "AppDelegate.h" #import <CTXMAMCore/CTXMAMCore.h> @interface AppDelegate () @end @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [CTXMAMCore setDelegate:self]; [CTXMAMCore initializeSDKsWithCompletionBlock: ^(NSError * error) { //... }]; return YES; } //... @end

Swift:

import UIKit import CTXMAMCore @main class AppDelegate: UIResponder, UIApplicationDelegate, CTXMAMCoreSdkDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { CTXMAMCore.setDelegate(self) CTXMAMCore.initializeSDKs() return true } //... }

Test

Add SDK Initialization Code