import SwiftUI import XuqmCoreSDK import XuqmBugCollectSDK import XuqmPushSDK @main struct YiwangxinApp: App { @UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate init() { do { try XuqmSDK.shared.autoInitialize(debug: _isDebugAssertConfiguration()) } catch { print("[YiwangxinApp] XuqmSDK.autoInitialize failed: \(error)") } #if DEBUG BugCollectSDK.shared.setLogLevel(.debug) #else BugCollectSDK.shared.setLogLevel(.warn) #endif Task { @MainActor in try? await PushSDK.shared.start() } } var body: some Scene { WindowGroup { AppRootView() } } }