Type Method

exportPresetsCompatibleWithAsset:

Returns the identifiers compatible with a given asset.

Declaration

+ (NSArray<NSString *> *)exportPresetsCompatibleWithAsset:(AVAsset *)asset;

Parameters

asset

An asset that is ready to be exported.

Return Value

An array of NSString objects representing the identifiers compatible with asset.

The array is a complete list of the valid identifiers that can be used with exportSessionWithAsset:presetName: with the specified asset. For possible values, see Export Preset Names for Device-Appropriate QuickTime Files, Export Preset Names for QuickTime Files of a Given Size, AVAssetExportSessionStatusCancelled, Export Preset Name for iTunes Audio, and Export Preset Name for Pass-Through.

Discussion

Not all export presets are compatible with all assets. For example, a video-only asset is not compatible with an audio-only preset. This method returns only the identifiers for presets that are compatible with the given asset.

In order to ensure that the setup and running of an export operation will succeed using a given preset, you should not make significant changes to the asset (such as adding or deleting tracks) between retrieving compatible identifiers and performing the export operation.

If the asset’s tracks are not currently loaded, they may be loaded by this method before any checks are performed.

See Also

Configuring Export Presets

presetName

The name of the preset used to initialize the session.

+ allExportPresets

Returns all available export preset names.

+ determineCompatibilityOfExportPreset:withAsset:outputFileType:completionHandler:

Reports the compatibility of an export present, asset, and output file type to the specified block.

Export Preset Names for Device-Appropriate QuickTime Files

You use these export options to produce QuickTime movie files with video size appropriate to the current device.

Export Preset Names for QuickTime Files of a Given Size

You use these export options to produce QuickTime movie files with a specified video size.

Export Preset Name for iTunes Audio

You use this export option to produce an audio-only MPEG 4 Audio file with appropriate iTunes gapless playback data.

Export Preset Names for Apple Devices

You use these export options to produce playable files for use on specific Apple devices.

Export Preset Name for Pass Through

You use this export option to let all tracks pass through as formatted unless otherwise prohibited.

- determineCompatibleFileTypesWithCompletionHandler:

Reports the compatible file types for the current export session to the specified block.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software