Go to homepage

Reid Main

iOS developer

  1. Archives
  2. Tags
  3. About
  4. @reidmain
  5. Email
  6. GitHub

🔗 Ole Begemann: Browsing your iOS app's Documents directory using the Files app

Pro tip: if you set LSSupportsOpeningDocumentsInPlace=YES and UIFileSharingEnabled=YES in your Info.​plist, you can inspect your app’s Documents directory in the Files.​app.

I subscribe to Ole Begemann's blog but his Twitter feed is also a great source of iOS and Swift information.

This time he brought to my attention an amazing little Info.plist key, LSSupportsOpeningDocumentsInPlace. As his tweet says, if you combine LSSupportsOpeningDocumentsInPlace with UIFileSharingEnabled the Files app can then browse the contents of your app's Documents directory.

If your app makes a lot of changes to the Documents directory this would be a much faster way to inspect its contents versus downloading the entire app container via Xcode. Also, you could leave the keys in for employee beta builds to make tracking down bugs easier. Instead of having to get physical access to a tester's phone to download the app container you could get them to inspect the Documents directory themselves. As someone who has worked at a company with 10,000+ employees spread out across the entire planet, this would have come in very handy.


🎮