<!--
{
  "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(_:shouldWaitForResponseTo:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(pl)AVAssetResourceLoaderDelegate(im)resourceLoader:shouldWaitForResponseToAuthenticationChallenge:"
  },
  "title" : "resourceLoader(_:shouldWaitForResponseTo:)"
}
-->

# resourceLoader(_:shouldWaitForResponseTo:)

Tells the delegate that assistance is required of the application to respond to an authentication challenge.

```
optional func resourceLoader(_ resourceLoader: AVAssetResourceLoader, shouldWaitForResponseTo authenticationChallenge: URLAuthenticationChallenge) -> Bool
```

## Parameters

`resourceLoader`

The resource loader.

`authenticationChallenge`

The authentication challenge.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the resource loader should wait for a response to the authentication challenge; otherwise <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

Delegates receive this message when assistance is required of the application to respond to an authentication challenge.

Return <doc://com.apple.documentation/documentation/Swift/true> if you expect a response either subsequently or immediately to the authenticationChallenger object’s sender.

If you intend to respond to the authentication challenge after your handling of `resourceLoader:shouldWaitForResponseToAuthenticationChallenge:` returns, you must retain the authenticationChallenge until after your response has been made.

---

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)