<!--
{
  "availability" : [
    "macOS: 10.15.0 - 10.15.0",
    "tvOS: 9.0.0 - 9.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVAssetResourceLoadingRequest/finishLoading(with:data:redirect:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVAssetResourceLoadingRequest(im)finishLoadingWithResponse:data:redirect:"
  },
  "title" : "finishLoading(with:data:redirect:)"
}
-->

# finishLoading(with:data:redirect:)

Causes the receiver to finish loading a resource for which a resource loader’s delegate took responsibility .

```
func finishLoading(with response: URLResponse?, data: Data?, redirect: URLRequest?)
```

## Parameters

`response`

The response object for the requested resource. Use the request object in the receiver’s [`request`](/documentation/AVFoundation/AVAssetResourceLoadingRequest/request) property to get information about the requested resource.

`data`

The data of the resource. If no data is available, specify `nil`.

`redirect`

When redirecting a resource request, use this parameter to specify the corresponding <doc://com.apple.documentation/documentation/Foundation/NSURLRequest> object. If you are handling the request and not redirecting it, specify `nil`.

## Discussion

When a resource loader’s delegate takes responsibility for loading a resource, it calls this method to indicate that the resource was loaded successfully. This method marks the loading request as finished and returns the provided data back to the resource loader object for processing.

---

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)