Instance Method


Requests exclusive access to the device’s hardware properties.


- (BOOL)lockForConfiguration:(NSError * _Nullable *)outError;



On input, specify a pointer to an error object. If a lock cannot be acquired, this pointer contains an NSError object that describes the problem. You may specify nil for this property.

Return Value

YES if a lock was acquired or NO if it was not.


You must call this method before attempting to configure the hardware related properties of the device. This method returns YES when it successfully locks the device for configuration by your code. After configuring the device properties, call unlockForConfiguration to release the configuration lock and allow other apps to make changes.

You may hold onto a lock (instead of releasing it) if you require the device properties to remain unchanged. However, holding the device lock unnecessarily may degrade capture quality in other apps sharing the device.

See Also

Configuring the Device

- unlockForConfiguration

Relinquishes exclusive control over the device’s configuration.


Indicates whether the device is being used exclusively by another application.


Indicates whether the device is suspended.


An array of AVCaptureDevice objects representing the devices physically linked to the receiver.


The transport type of the receiver.


A distinct input source on a capture device.


An array of AVCaptureDeviceInputSource objects representing the input sources supported by the device.


The currently active input source.

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