<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.9.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVAssetResourceLoadingContentInformationRequest/contentLength",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVAssetResourceLoadingContentInformationRequest(py)contentLength"
  },
  "title" : "contentLength"
}
-->

# contentLength

The length, in bytes, of the requested resource.

```
var contentLength: Int64 { get set }
```

## Discussion

Before finishing loading an [`AVAssetResourceLoadingRequest`](/documentation/AVFoundation/AVAssetResourceLoadingRequest) instance, if its [`contentInformationRequest`](/documentation/AVFoundation/AVAssetResourceLoadingRequest/contentInformationRequest) property is not `nil`, set the value of the `contentLength` property to the number of bytes contained by the requested resource.

---

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)