---
title: "canAddTrackAssociation(withTrackOf:type:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avassetwriterinput/canaddtrackassociation(withtrackof:type:)"
---

# canAddTrackAssociation(withTrackOf:type:)

Determines whether it’s valid to associate another input’s track with this input’s track.

## Declaration

```swift
func canAddTrackAssociation(withTrackOf input: AVAssetWriterInput, type trackAssociationType: String) -> Bool
```

## Parameters

- `input`: An asset writer input that contains the track to associate.
- `trackAssociationType`: The type of track association to test.

## Return Value

Return Value true if the system can make the association between tracks; otherwise, false.

## Discussion

Discussion This method returns false if the association type requires tracks of a media type that doesn’t match the input’s type, or if the output file type doesn’t support track associations.

## See Also

### Configuring track associations

- [addTrackAssociation(withTrackOf:type:)](avfoundation/avassetwriterinput/addtrackassociation(withtrackof:type:).md)
