Thanks for the suggestion. So far I've avoided the Observation framework because I do a lot of sharing of view models between AppKit and SwiftUI and my (brief) experience with Observation pushed me to just stick with ObservableObject instead.
Great! I had not considered using a custom Binding shadowing the "real" state. I'll explore this idea further but I think this has pointed me in the right direction, thank you.
Huh, interesting, thank you. To get a segmented control I've been using a Picker but hadn't considered a ControlGroup. Is there any way to know what permutation of controls inside the ControlGroup generate comparable AppKit (or AppKit-like) results?
Understood. FWIW, the issues are that the LookAroundPreview doesn't allow you to... look around. All it shows is a static, non-interactive image. No controls; no panning, no zooming, no movement. The desire to integrate the LookAroundPreview is to offer users the ability to... look around. This is incorporated into an application that maps lat/lng coordinates to pin markers. We would like users to be able to look around at the pin location.
Ok, I was aware of this workaround but was hoping there might have been a SwiftUI "native" implementation I had overlooked. Thanks for the prompt reply. If you're working on SwiftUI for macOS, I'm happy to say that its improved significantly since I last explored it a few years back.
I wonder if I can just "touch" the file on the application side so that I can then create a bookmark for the XPC service.
The use case is creating a new SQLite database in the XPC service... In that context, another problem that needs addressing is how to handle WAL files. If I grant access to my_database.db and then SQLite needs to create a WAL file, it won't be able to. I fear that might be another deal breaker.
Thanks Quinn....
(Revisiting some old apps and app ideas...)
Ugh, I feared that would be the case. 2024 and the limitations of the App Sandbox on macOS, while good intentioned, continue to bite.
If I remember, there's a private NSXPCCoder class (or similarly named), that is encoding objects being sent to an XPC service. Some objects, like NSURL are handled in a special, undocumented way.
Notably, you could encode a plain NSURL, without bookmark data, and it "just works", or at least I recall it working. xpc_session is so promising!
:(
Thanks for the suggestion. So far I've avoided the Observation framework because I do a lot of sharing of view models between AppKit and SwiftUI and my (brief) experience with Observation pushed me to just stick with ObservableObject instead.
Great! I had not considered using a custom Binding shadowing the "real" state. I'll explore this idea further but I think this has pointed me in the right direction, thank you.
Huh, interesting, thank you. To get a segmented control I've been using a Picker but hadn't considered a ControlGroup. Is there any way to know what permutation of controls inside the ControlGroup generate comparable AppKit (or AppKit-like) results?
Understood. FWIW, the issues are that the LookAroundPreview doesn't allow you to... look around. All it shows is a static, non-interactive image. No controls; no panning, no zooming, no movement. The desire to integrate the LookAroundPreview is to offer users the ability to... look around. This is incorporated into an application that maps lat/lng coordinates to pin markers. We would like users to be able to look around at the pin location.
Ok, I was aware of this workaround but was hoping there might have been a SwiftUI "native" implementation I had overlooked. Thanks for the prompt reply. If you're working on SwiftUI for macOS, I'm happy to say that its improved significantly since I last explored it a few years back.
I wonder if I can just "touch" the file on the application side so that I can then create a bookmark for the XPC service.
The use case is creating a new SQLite database in the XPC service... In that context, another problem that needs addressing is how to handle WAL files. If I grant access to my_database.db and then SQLite needs to create a WAL file, it won't be able to. I fear that might be another deal breaker.
Thanks Quinn....
(Revisiting some old apps and app ideas...)
Ugh, I feared that would be the case. 2024 and the limitations of the App Sandbox on macOS, while good intentioned, continue to bite.
If I remember, there's a private NSXPCCoder class (or similarly named), that is encoding objects being sent to an XPC service. Some objects, like NSURL are handled in a special, undocumented way.
Notably, you could encode a plain NSURL, without bookmark data, and it "just works", or at least I recall it working. xpc_session is so promising!
:(