I think there is a general lack of support for granting access to folders on 3rd party storage providers (i.e. not iCloud Drive). I say this because document-based apps that use UIDocumentBrowserViewController with a package format will fail to save on all 3rd party storage providers. Similarly, Swift Data documents also fail to save on all 3rd party storage providers (since they use the package format as well). I wish they would fix this, it's a support nightmare and a poor user experience!
Post
Replies
Boosts
Views
Activity
Has anyone gotten a SwiftData document app to work on macOS? (Meaning, being able to re-open a saved document and edit it.)
I'm having the same issue here (this even happens with the built-in template for a Multiplatform Document app using SwiftData) -- has anyone found a workaround? I filed a DTS to see if they can provide a work-around. I'll update here if they are able to provide one.
After being advised against UIManagedDocument by Apple's DTS, I ended up having to write an elaborate alternative that tracked changes to the context and used migratePersistentStore(_:to:options:type:) when the document saved (to ensure all changes were included). I was hoping, given the prominence in WWDC sessions, that this time would be easier. 🙈
It seems to be fixed for me on 14.1 and 15.0.1 as well, thanks for the heads-up!!
Thanks for the update! To be clear -- this is something the File Provider needs to support, correct? So instead of filing bug reports with Apple, now we need to direct our users to contact their File Provider of choice to get them to implement this?
I am also able to easily reproduce this crash with the sample project. See below as I couldn't attach my screen shot in a comment.