API for new "Keep Downloaded" feature in iCloud Drive?

It looks like in iOS 18, there is a new option in Files to "Keep Downloaded". I.e., mark a file to be downloaded and never evicted. Is there an API that would allow us to provide this feature in our app?

Our app stores files in a ubiquitous container and displays them in a custom UI (not a UIDocumentBrowserViewController). We've had a longstanding request from users that they be able to mark a file as always available locally, so that they can make sure they have access to it even if they go offline. We've done a hacky, best-effort implementation of this, but there is no truly reliable way to achieve this through the existing APIs.

Answered by DTS Engineer in 790739022

The option is designed to be used via user interaction only. There is no API for developers to programmatically set the option.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

The option is designed to be used via user interaction only. There is no API for developers to programmatically set the option.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

API for new "Keep Downloaded" feature in iCloud Drive?
 
 
Q