---
title: "authorizationStatus(for:)"
framework: avfoundation
role: symbol
role_heading: Type Method
path: "avfoundation/avcapturedevice/authorizationstatus(for:)"
---

# authorizationStatus(for:)

Returns an authorization status that indicates whether the user grants the app permission to capture media of a particular type.

## Declaration

```swift
class func authorizationStatus(for mediaType: AVMediaType) -> AVAuthorizationStatus
```

## Parameters

- `mediaType`: A media type for which to check the authorization status. The supported media types are doc://com.apple.avfoundation/documentation/AVFoundation/AVMediaType/video and doc://com.apple.avfoundation/documentation/AVFoundation/AVMediaType/audio.

## Mentioned in

Requesting authorization to capture and save media

## Return Value

Return Value An authorization status value.

## Discussion

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. note: If a user has denied your app recording permission, or hasn’t yet responded to the permission prompt, audio recordings contain only silence and video recordings contain only black frames.

## See Also

### Authorizing device access

- [requestAccess(for:completionHandler:)](avfoundation/avcapturedevice/requestaccess(for:completionhandler:).md)
- [AVAuthorizationStatus](avfoundation/avauthorizationstatus.md)
