What's the non-sandboxed path to Downloads folder on the iPhone

I'm trying to construct a URL that, when tapped, would launch Files app and open the Downloads folder on the iPhone (not in iCloud Drive). I know the URL scheme is shareddocuments but I can't figure out the path. I have tried a few things including writing a simple iOS app and using Scriptable app. But I always get a sandboxed path such as /private/var/mobile/Containers/Data/Application/87CC2F48-AF1C-4C80-8D75-B6CC1FC642E3/Downloads/. But that wouldn't work across devices.

Does anyone happen to know the path or a method to obtain the non-sandboxed path? Thanks.

PS I already figured out the Downloads folder in iCloud Drive, which is shareddocuments:///private/var/mobile/Library/Mobile%20Documents/com~apple~CloudDocs/Downloads. But what I need is the one on the iPhone.

Answered by DTS Engineer in 836369022

On iOS there’s no supported way to construct paths to items outside of your apps containers. The only supported way to get such paths is to ask the user for them, using the file selection API from the UI framework you’re using.

Furthermore, this is a concern:

I know the URL scheme is shareddocuments

AFAIK this is not a a documented URL scheme. I discuss that topic in more detail in Supported URL Schemes.

WARNING Don’t build a product that relies on unsupported implementation details like. It’s very likely that your product will break in future releases of iOS and, if it does, there’s a good chance that there’ll be no path forward for your app.

If you’d like us to add a supported mechanism to achieve this goal, I encourage you to file an enhancement request describing your requirements.

Please post your bug number, just for the record.

Share and Enjoy

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

Accepted Answer

On iOS there’s no supported way to construct paths to items outside of your apps containers. The only supported way to get such paths is to ask the user for them, using the file selection API from the UI framework you’re using.

Furthermore, this is a concern:

I know the URL scheme is shareddocuments

AFAIK this is not a a documented URL scheme. I discuss that topic in more detail in Supported URL Schemes.

WARNING Don’t build a product that relies on unsupported implementation details like. It’s very likely that your product will break in future releases of iOS and, if it does, there’s a good chance that there’ll be no path forward for your app.

If you’d like us to add a supported mechanism to achieve this goal, I encourage you to file an enhancement request describing your requirements.

Please post your bug number, just for the record.

Share and Enjoy

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

What's the non-sandboxed path to Downloads folder on the iPhone
 
 
Q