NSBundle object manages the availability of on-demand resources. On-demand resources are app contents hosted on the App Store that you download only when you need them.
You identify on-demand resources during development by creating string identifiers known as tags and assigning one or more tags to each resource. An
NSBundle object manages the resources marked by one or more tags.
You use the resource request to inform the system when the managed tags are needed and when you have finished accessing them. The resource request manages the downloading of any resources marked with the managed tags that are not already on the device and informs your app when the resources are ready for use.
The system will not attempt to purge the resources marked with a tag from on-device storage as long as at least one
NSBundle object is managing the tag. Apps can access resources after the completion handler of either
conditionally is called successfully. Management ends after a call to
end or after the resource request object is deallocated.
Other properties and methods let you track the progress of a download, change the priority of a download, and check whether the resources marked by a set of tags are already on the device. Methods in
Bundle indicate to the system the relative importance of preserving a tag in memory after it is no longer in use. For more information, see