Reputation: 153
I am trying to implement a feature where users can define their own documents using the "Files" app of iOS. I read that in order for your app to get access to the Files app you need to define these two keys in your info.plist
<key>UIFileSharingEnabled</key>
<true/>
<key>LSSupportsOpeningDocumentsInPlace</key>
<true/>
I defined those two keys but when I run my app and write to a document directory,
FileManager.default.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: true)
I dont see any Folder created with my written file inside the Files app. Interestingly, If I run the same app on my iPhone, I see the folder of my app inside the Files app immediately. I am not sure what could make the sharing only happen on iPhone and not iPad. My iPhone is running iOs 13.3 and my iPad is running 13.3.1 so not much of a difference here. Does anyone have any clue as what could be wrong?
Upvotes: 1
Views: 7006
Reputation: 71
I have two iPads, both showing documents folders of my apps (a family of calculator simulations.) The apps were installed under iOS 13.3 or before. One of the iPads got updated to 13.3.1. I added one more app to both iPads. It promptly showed up in Files on the 13.3. device, but never on 13.3.1. Deleting the app, resetting the iPad, reinstalling - no luck. Looks definitely like an issue introduced with 13.3.1.
Update:
I finally figured out what's going on. Since the problem didn't disappear with iOS 13.4, I did some more digging. As a result, here's how to make everything working:
Upvotes: 7