---
title: "canApply(outputSettings:forMediaType:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avassetwriter/canapply(outputsettings:formediatype:)"
---

# canApply(outputSettings:forMediaType:)

Determines whether the output file format supports the output settings for a specific media type.

## Declaration

```swift
func canApply(outputSettings: [String : Any]?, forMediaType mediaType: AVMediaType) -> Bool
```

## Parameters

- `outputSettings`: The output settings to validate.
- `mediaType`: The media type to validate the output settings for.

## Return Value

Return Value true if the format supports the output settings; otherwise, false.

## Discussion

Discussion Use this method to determine the compatibility of output settings for a particular media type. For example, video compression settings that specify H.264 compression aren’t compatible with file formats that don’t contain H.264-compressed video.

## See Also

### Configuring inputs

- [inputs](avfoundation/avassetwriter/inputs.md)
- [availableMediaTypes](avfoundation/avassetwriter/availablemediatypes.md)
- [canAdd(_:)](avfoundation/avassetwriter/canadd(_:)-6al7j.md)
- [add(_:)](avfoundation/avassetwriter/add(_:)-4c4d0.md)
