<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVAssetResourceLoaderDelegate/resourceLoader(_:shouldWaitForRenewalOfRequestedResource:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(pl)AVAssetResourceLoaderDelegate(im)resourceLoader:shouldWaitForRenewalOfRequestedResource:"
  },
  "title" : "resourceLoader(_:shouldWaitForRenewalOfRequestedResource:)"
}
-->

# resourceLoader(_:shouldWaitForRenewalOfRequestedResource:)

Tells the delegate when assistance is required of the application to renew a resource.

```
optional func resourceLoader(_ resourceLoader: AVAssetResourceLoader, shouldWaitForRenewalOfRequestedResource renewalRequest: AVAssetResourceRenewalRequest) -> Bool
```

## Parameters

`resourceLoader`

The resource loader.

`renewalRequest`

An instance of `AVAssetResourceRenewalRequest` that provides information about the requested resource.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the delegate can renew the resource; otherwise <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

Delegates receive this message when assistance is required to renew a resource previously loaded by [`resourceLoader(_:shouldWaitForLoadingOfRequestedResource:)`](/documentation/AVFoundation/AVAssetResourceLoaderDelegate/resourceLoader(_:shouldWaitForLoadingOfRequestedResource:)). For example, this method is invoked to for decryption keys that require renewal, as indicated in a response to a prior invocation of [`resourceLoader(_:shouldWaitForLoadingOfRequestedResource:)`](/documentation/AVFoundation/AVAssetResourceLoaderDelegate/resourceLoader(_:shouldWaitForLoadingOfRequestedResource:)).

If the result is <doc://com.apple.documentation/documentation/Swift/true>, the resource loader expects invocation, either subsequently or immediately, of either the `AVAssetResourceRenewalRequest` method `finishLoading` or `finishLoadingWithError:`. If you intend to finish loading the resource after your handling of this message returns, you must retain the `renewalRequest` until after loading is finished.

If the result is <doc://com.apple.documentation/documentation/Swift/false>, the resource loader treats the loading of the resource as having failed.

> Note:
> If the delegate’s implementation of -``doc://com.apple.avfoundation/documentation/AVFoundation/AVAssetResourceLoaderDelegate/resourceLoader(_:shouldWaitForLoadingOfRequestedResource:)`` returns <doc://com.apple.documentation/documentation/Swift/true> without finishing the loading request immediately, it may be invoked again with another loading request before the prior request is finished; therefore in such cases the delegate should be prepared to manage multiple loading requests.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)