Type Method

metadataItemsFromArray:filteredAndSortedAccordingToPreferredLanguages:

Provides the subset of metadata items whose locales match one of the specified language identifiers.

Declaration

+ (NSArray<AVMetadataItem *> *)metadataItemsFromArray:(NSArray<AVMetadataItem *> *)metadataItems filteredAndSortedAccordingToPreferredLanguages:(NSArray<NSString *> *)preferredLanguages;

Parameters

metadataItems

An array of AVMetadataItem objects to be filtered and sorted.

preferredLanguages

An array of NSString objects, each of which contains a canonicalized IETF BCP 47 language identifier. The order of the identifiers in the array reflects the preferred language order, with the most preferred language being first in the array. Typically, you pass the user’s preferred languages by retrieving this array from the preferredLanguages class method of NSLocale.

Return Value

An array containing the AVMetadataItem objects from the metadataItems parameter that match one of the specified languages.

See Also

Filtering Arrays of Metadata Items

+ metadataItemsFromArray:withKey:keySpace:

Provides an array of metadata items that match a specified key or key space.

AVMetadataKeySpace

A value that defines a metadata key space.

+ metadataItemsFromArray:withLocale:

Provides an array of metadata items that match a specified locale.

+ metadataItemsFromArray:filteredByMetadataItemFilter:

Filters an array of metadata items using the metadata item filter.

+ metadataItemsFromArray:filteredByIdentifier:

Filters an array of metadata items according to the supplied identifier.

AVMetadataIdentifier

A value that defines the metadata identifiers for different file formats.