Posts

Post not yet marked as solved
4 Replies
325 Views
I would like to get notified, when a specific file gets opened or closed by another application. I tried different things like DispatchSource, FSEvents and kqueue, but nothing worked. The only option so far is searching for all process ids, that accesses the file with proc_listpidspath (or with the command line tool lsof). Unfortunately I need to use a Timer for this. But checking i. e. every second will need a lot of CPU, so I'm curious, if there is a built in notification in macOS?
Posted Last updated
.
Post not yet marked as solved
10 Replies
4.9k Views
Hi, I created a new project with Xcode 12 beta on Big Sur beta. I changed the code in the @main-wrapper to this: 	@Environment(\.scenePhase) private var scenePhase var body: some Scene { WindowGroup { ContentView() } .onChange(of: scenePhase) { (newScenePhase) in print(newScenePhase) } } If I start the application (either macOS or iOS), nothing happens, nothing will be printed in the onChange. Do I miss something?
Posted Last updated
.
Post not yet marked as solved
1 Replies
615 Views
Is it possible in SwiftUI to have a tabbed interface like in Safari? The videos of the WWDC only shows that you can group several windows on macOS to tabs, but is this possible in iPadOS as well and can I create tabs programmatically?
Posted Last updated
.