---
title: NSBundleResourceRequest
framework: foundation
role: symbol
role_heading: Class
path: foundation/nsbundleresourcerequest
---

# NSBundleResourceRequest

A resource manager you use to download content hosted on the App Store at the time your app needs it.

## Declaration

```swift
class NSBundleResourceRequest
```

## Overview

Overview You identify on-demand resources during development by creating string identifiers known as tags and assigning one or more tags to each resource. An NSBundleResourceRequest 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. note: This class ignores calls from Mac apps built with Mac Catalyst. The system will not attempt to purge the resources marked with a tag from on-device storage as long as at least one NSBundleResourceRequest object is managing the tag. Apps can access resources after the completion handler of either beginAccessingResources(completionHandler:) or conditionallyBeginAccessingResources(completionHandler:) is called successfully. Management ends after a call to endAccessingResources() 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 setPreservationPriority(_:forTags:) and preservationPriority(forTag:). important: An NSBundleResourceRequest object can only be used for one successful resource request.

## Topics

### Initializing a resource request

- [init(tags:)](foundation/nsbundleresourcerequest/init(tags:).md)
- [init(tags:bundle:)](foundation/nsbundleresourcerequest/init(tags:bundle:).md)

### Accessing the configuration

- [bundle](foundation/nsbundleresourcerequest/bundle.md)
- [tags](foundation/nsbundleresourcerequest/tags.md)

### Requesting resources

- [beginAccessingResources(completionHandler:)](foundation/nsbundleresourcerequest/beginaccessingresources(completionhandler:).md)
- [conditionallyBeginAccessingResources(completionHandler:)](foundation/nsbundleresourcerequest/conditionallybeginaccessingresources(completionhandler:).md)
- [endAccessingResources()](foundation/nsbundleresourcerequest/endaccessingresources().md)

### Setting the download priority

- [loadingPriority](foundation/nsbundleresourcerequest/loadingpriority.md)
- [NSBundleResourceRequestLoadingPriorityUrgent](foundation/nsbundleresourcerequestloadingpriorityurgent.md)

### Tracking progress

- [progress](foundation/nsbundleresourcerequest/progress.md)

### Errors

- [NSBundleErrorMaximum](foundation/nsbundleerrormaximum-swift.var.md)
- [NSBundleErrorMinimum](foundation/nsbundleerrorminimum-swift.var.md)
- [NSBundleOnDemandResourceExceededMaximumSizeError](foundation/nsbundleondemandresourceexceededmaximumsizeerror-swift.var.md)
- [NSBundleOnDemandResourceInvalidTagError](foundation/nsbundleondemandresourceinvalidtagerror-swift.var.md)
- [NSBundleOnDemandResourceOutOfSpaceError](foundation/nsbundleondemandresourceoutofspaceerror-swift.var.md)

### Working with notifications

- [NSBundleResourceRequestLowDiskSpace](foundation/nsnotification/name-swift.struct/nsbundleresourcerequestlowdiskspace.md)

### Working with notification messages

- [NSBundleResourceRequest.LowDiskSpaceMessage](foundation/nsbundleresourcerequest/lowdiskspacemessage.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [ProgressReporting](foundation/progressreporting.md)
