authorizationStatus(for:)
Returns an authorization status that indicates whether the user grants the app permission to capture media of a particular type.
Declaration
class func authorizationStatus(for mediaType: AVMediaType) -> AVAuthorizationStatusParameters
Mentioned in
Return Value
An authorization status value.
Discussion
A user must explicitly grant your app access to record audio or video. Call this method to determine your app’s current authorization status. If it returns a value of AVAuthorizationStatus.notDetermined, call requestAccess(for:completionHandler:) to prompt the user for capture permission.
After the user grants permission, the system remembers their choice and doesn’t prompt them again. However, a user can change their choice at any time in the Settings app.