MAM SDK for iOS and iPadOS
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
<!--NeedCopy-->
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
}
//...
}
<!--NeedCopy-->
Test
- Set a breakpoint at the initialization.
- Run the project.
- When the breakpoint is reached, notice the log output in the output window.
- Congratulations, you have built a basic application with the iOS MAM SDKs integrated and initialized.
-
You can now integrate the specific functionality needed for your application:
- Implement the Compliance SDK
- Implement the Containment SDK
- Implement the Local Authentication SDK
- Implement the Micro VPN SDK
Add SDK Initialization Code
Copied!
Failed!