import SwiftUI @main struct AnotherIMApp: App { @UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate @StateObject var wrapper = MonalXmppWrapper() var body: some Scene { WindowGroup { RootView() .environmentObject(wrapper) } } } class AppDelegate: NSObject, UIApplicationDelegate {}