Copied to your clipboard@import AEPCore;@import AEPSignal;@import AEPLifecycle;@import AEPIdentity;@import AEPUserProfile;@import AEPServices;@import AEPAssurance;...// AppDelegate.m- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {const UIApplicationState appState = application.applicationState;[AEPMobileCore setLogLevel: AEPLogLevelDebug];[AEPMobileCore registerExtensions:@[AEPMobileSignal.class, AEPMobileLifecycle.class, AEPMobileUserProfile.class, AEPMobileIdentity.class, AEPMobileAssurance.class] completion:^{[AEPMobileCore configureWithAppId: @"yourAppId"];if (appState != UIApplicationStateBackground) {// only start lifecycle if the application is not in the background[AEPMobileCore lifecycleStart:@{@"contextDataKey": @"contextDataVal"}];}}];...}
Copied to your clipboard// AppDelegate.swiftimport AEPAssuranceimport AEPCoreimport AEPIdentityimport AEPLifecycleimport AEPSignalimport AEPUserProfilefunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {let appState = application.applicationStateMobileCore.registerExtensions([Signal.self, Lifecycle.self, UserProfile.self, Identity.self, Assurance.self], {MobileCore.configureWith(appId: "yourAppId")if appState != .background {// only start lifecycle if the application is not in the backgroundMobileCore.lifecycleStart(additionalContextData: ["contextDataKey": "contextDataVal"])}})...}