Not all applications are able to use FileWrappers, ie. they may be using a C library that reads files via POSIX APIs. Thus, the path to the file within the document bundle is required for this usage.
Currently its possible to get fileURL from FileDocumentConfiguration which comes from DocumentGroup() but this is not accessible from within the FileDocument instance itself.
I am having to hack around this by making the ContentView pass a force unwrapped URL into the FileDocument. This is very messy and there is no room for error handling in the view's init() code.
Surely there should be a proper way to do this?
Post
Replies
Boosts
Views
Activity
Its great to have WindowGroup and Scenes - but how do we open one of these windows on macOS programatically or from a menu item?
How do we decide what windows open on launch?
We have software that needs to identify clients even if their LAN IP address changes. Is there a supported way to get the ARP table on macOS 10.15/11? Preferably in Swift.
Are there any library functions or frameworks for working with IPv4/IPv6 subnets or ranges? Ie. to check whether a particular IP is within a subnet, or whether a particular IP is a LAN address, etc?
We have a view that requires raw mouse/keyboard input - how can this be done via SwiftUI? I can't find any such APIs.