Tells the receiver to start running.
SDKs
- iOS 4.0+
- macOS 10.7+
- Mac Catalyst 13.0+
Framework
- AVFoundation
Declaration
- (void)startRunning;
Discussion
This method is used to start the flow of data from the inputs to the outputs connected to the AVCapture
instance that is the receiver. This method is synchronous and blocks until the receiver has either completely started running or failed to start running. If an error occurs during this process and the receiver fails to start running, you receive an AVCapture
.
Important
The start
method is a blocking call which can take some time, therefore you should perform session setup on a serial queue so that the main queue isn't blocked (which keeps the UI responsive). See AVCam-iOS: Using AVFoundation to Capture Images and Movies for an implementation example.