<!--
{
  "availability" : [
    "iOS: 4.0.0 - 16.0.0",
    "iPadOS: 4.0.0 - 16.0.0",
    "macCatalyst: 13.1.0 - 16.0.0",
    "macOS: 10.7.0 - 13.0.0",
    "tvOS: 9.0.0 - 16.0.0",
    "watchOS: 1.0.0 - 9.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVFragmentedAsset/track(withTrackID:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVFragmentedAsset(im)trackWithTrackID:"
  },
  "title" : "track(withTrackID:)"
}
-->

# track(withTrackID:)

Returns a track that contains the specified identifier.

```
func track(withTrackID trackID: CMPersistentTrackID) -> AVFragmentedAssetTrack?
```

## Parameters

`trackID`

The identifier of the track to return.

## Return Value

A fragmented asset track, or `nil` if no track with the specified identifier is available.

## Discussion

Apple discourages the use of this method in iOS 15, tvOS 15, and macOS 12 or later. Load a track asynchronously using [`loadTrack(withTrackID:completionHandler:)`](/documentation/AVFoundation/AVFragmentedAsset/loadTrack(withTrackID:completionHandler:)) instead.

You may call this method without blocking the current thread after you’ve asynchronously loaded the [`tracks`](/documentation/AVFoundation/AVAsset/tracks) property.

---

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)