FileDocument URL (can't use FileWrapper!)

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?

bump

Can any Apple engineer chime in? I've seen others having to work around this issue as well. It makes for some messy/potentially buggy init code.

FileDocument URL (can't use FileWrapper!)
 
 
Q