Instance Method

statusOfValueForKey:error:

Returns a status indicating whether the value for a given key is immediately available without blocking the calling thread.

Required.

Declaration

- (AVKeyValueStatus)statusOfValueForKey:(NSString *)key error:(NSError * _Nullable *)outError;

Parameters

key

The key whose status you want. See AVKeyValueStatus for the defined keys.

outError

If the status of the value for the key is AVKeyValueStatusFailed, the outError is set to a valid NSError object that describes the nature of the failure that occurred.

Return Value

The current loading status of the value for key. See AVKeyValueStatus for the defined keys.

Discussion

You use this method to determine the availability of the value for a key. This method does not cause an asset to load the value of a key that’s not yet available. To request values for keys that may not already be loaded without blocking, use loadValuesAsynchronouslyForKeys:completionHandler: and wait for invocation of the completion handler to be informed of availability.

See Also

Loading Assets by Key

- loadValuesAsynchronouslyForKeys:completionHandler:

Tells the asset to load the values of all of the specified keys (property names) that are not already loaded.

Required.