Reference

On-Demand Resources Internals

On-Demand Resources (ODR) let an iOS app download tagged asset packs from the App Store after install and have the OS purge them automatically under storage pressure. The downloaded content counts as purgeable space the system can reclaim without uninstalling the app.

iOS developmentiOSiPadOS

On-Demand Resources Internals

Also known as: odr ios, on demand resources tags, ios on demand resources

On-Demand Resources (ODR) let an iOS app download tagged asset packs from the App Store after install and have the OS purge them automatically under storage pressure. The downloaded content counts as purgeable space the system can reclaim without uninstalling the app.

  • Assets are tagged in Xcode, hosted by the App Store, and fetched at runtime via NSBundleResourceRequest.
  • Unpinned packs become purgeable; iOS evicts least-recently-used ones automatically under storage pressure.
  • Re-downloaded on next access, so ODR trades local storage for network — it is not permanently lost.

How ODR works

With On-Demand Resources, developers tag assets (levels, tutorials, large media) in Xcode and the App Store hosts them separately from the app binary. At runtime the app requests a tag set through NSBundleResourceRequest and beginAccessingResources(completionHandler:); the system downloads the pack into app-managed but OS-controlled storage and mounts it as part of the bundle.

Each request holds the resources in place while in use. Calling endAccessingResources() (or releasing the request) tells the OS the content is no longer pinned, after which it becomes eligible for purging.

Purgeable space and reclamation

ODR packs that are not currently being accessed sit in purgeable space. When the device runs low on storage, iOS evicts the least-recently-used packs automatically — the app re-downloads them on next access. Developers can hint priority with the loadingPriority property and keep packs resident using NSBundleResourcePreservationPriority values.

Because the system reclaims ODR transparently, this content rarely shows as user-deletable in Settings > General > iPhone Storage. It contributes to the broad System Data / Other bucket and to the purgeable headroom that lets the OS free space on demand.

Related terms

Keep reading the reference.

Act on it

Guides and tools for this topic.