How do I prevent my app's folders or files from being displayed or searched in the Files app?

How do I prevent my app's folders or files from being displayed or searched in the Files app?

Currently, the app is set to display internal files and folders in the "Files" app, Apple's default app.

Is there a way to turn this on and off within the app code so that our app's files or folders are not searched within the Files app?

All files and folders in the Documents path and their subfolders and files are eligible.

It depends on whether you want any of your documents visible to Files:

  • If you want some but not all, store the files that you don’t want visible in some other location, like applicationSupportDirectory.

  • If you want to turn off all access… bah, it’s been a while but I think that disabling UIFileSharingEnabled should do the tricky.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

How do I prevent my app's folders or files from being displayed or searched in the Files app?
 
 
Q