Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update AppDelegate.swift #10

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions Empty Luma App/Luma/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@ import UserNotifications
import Alamofire
import SwiftyJSON

import AEPCore
import AEPEdge
import AEPEdgeConsent
import AEPAssurance
import AEPEdgeIdentity
import AEPIdentity
import AEPLifecycle
import AEPSignal
import AEPServices
import AEPUserProfile

@AppStorage("environmentFileId") private var environmentFileId = "666644a00be2/1652228d142c/launch-b2835312c7d3-development"

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
Expand All @@ -26,6 +38,25 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
loadProducts()
MobileCore.setLogLevel(.debug)
let appState = application.applicationState
let extensions = [
Edge.self,
Consent.self,
Assurance.self,
AEPEdgeIdentity.Identity.self,
AEPIdentity.Identity.self,
Lifecycle.self,
Signal.self,
UserProfile.self
]
MobileCore.registerExtensions(extensions, {
MobileCore.configureWith(appId: "666644a00be2/1652228d142c/launch-b2835312c7d3-development")
if appState != .background {
MobileCore.lifecycleStart(additionalContextData: ["contextDataKey": "contextDataVal"])
}
})


return true
}
Expand Down