---
title: "track(withTrackID:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avasset/track(withtrackid:)"
---

# track(withTrackID:)

Returns a track that contains the specified identifier.

## Declaration

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

## Parameters

- `trackID`: The identifier of the track to retrieve.

## Return Value

Return Value An asset track, or nil if there is no track with the identifier.

## Discussion

Discussion You can call this method without blocking the current thread when the data in the tracks property is already loaded.
