another.im-ios/Monal/another.im/AnotherIMApp.swift
2024-12-09 19:40:05 +01:00

31 lines
745 B
Swift

import monalxmpp
import SwiftUI
@main
struct AnotherIMApp: App {
@UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
let wrapper = WrapperXMPP()
init() {
// DDLog.add(DDOSLogger.sharedInstance, with: .all)
MLProcessLock.initialize(forProcess: "MainApp")
}
var body: some Scene {
WindowGroup {
RootView()
.environmentObject(wrapper)
}
}
}
class AppDelegate: UIResponder, UIApplicationDelegate {
func applicationWillEnterForeground(_: UIApplication) {
MLXMPPManager.sharedInstance().nowForegrounded()
}
func applicationDidEnterBackground(_: UIApplication) {
// MLXMPPManager.sharedInstance().nowBackgrounded()
}
}