---
title: "conditionallyBeginAccessingResources(completionHandler:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsbundleresourcerequest/conditionallybeginaccessingresources(completionhandler:)"
---

# conditionallyBeginAccessingResources(completionHandler:)

Checks whether the resources marked with the tags managed by the request are already on the device. If all of the resources are on the device, you can begin accessing those resources.

## Declaration

```swift
func conditionallyBeginAccessingResources(completionHandler: @escaping @Sendable (Bool) -> Void)
```

```swift
func conditionallyBeginAccessingResources() async -> Bool
```

## Parameters

- `completionHandler`: A block called when the availability of the resources has been checked. The block takes the following parameter:

## Discussion

Discussion If the resources marked with the tags managed by the request are already on the device, you can start accessing them as soon as the completion handler is called with resourcesAvailable set to true. If all of the resources are not already available, you need to call beginAccessingResources(completionHandler:) to download them from the App Store. important: If resourcesAvailable is true, do not call beginAccessingResources(completionHandler:). You must call this method or beginAccessingResources(completionHandler:) before accessing any resources marked with the tags managed by the request.

## See Also

### Requesting resources

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