import ComposeApp
import SwiftUI
import os

@main
struct iOSApp: App {
    
    var body: some Scene {
        let test1:String="111";
        WindowGroup {
            ContentView().onAppear(){

                NotificationCenter.default.addObserver(
                    forName: NSNotification.Name("set_os_signal"),
                    object: nil,
                    queue: .main
                ) { note in
                    if let dic = note.object as? NSDictionary{
                        let text = dic.object(forKey: "text") as! NSString;
                        print("set_os_signal: \(text)")
                        let isBeginNumber = dic.object(forKey: "isBegin") as! NSNumber;
                        print("set_os_signal: \(isBeginNumber.boolValue)")
                        let signalId = dic.object(forKey: "id") as! NSString;
                        print("set_os_signal: \(signalId)")
                    }
                }

            }
                .ignoresSafeArea()
                .background(Color.clear)  // 确保整个背景透明
        }
        
    }


}
