// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: MIT-0 import SwiftUI import AWSMobileClient class AppDelegate: NSObject, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { AWSMobileClient.default().initialize { (userState, error) in if let userState = userState { print("UserState: \(userState.rawValue)") } else if let error = error { print("error: \(error.localizedDescription)") } } return true } } @main struct TrackingSampleApp: App { @UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate var body: some Scene { WindowGroup { ContentView() } } }