A query for finding and monitoring available capture devices.
SDKs
- iOS 10.0+
- macOS 10.15+
- Mac Catalyst 13.0+
Framework
- AVFoundation
Declaration
class DiscoverySession : NSObject
Overview
Use this class to find all available capture devices matching a specific device type (such as microphone or wide-angle camera), supported media types for capture (such as audio, video, or both), and position (front- or back-facing).
After creating a device discovery session, you can inspect its devices
array to choose a device for capture.