react-native-vision-camera/ios/Parsers/AVAuthorizationStatus+descriptor.swift

27 lines
544 B
Swift
Raw Normal View History

2021-02-19 08:28:05 -07:00
//
// AVAuthorizationStatus+descriptor.swift
// Cuvent
//
// Created by Marc Rousavy on 29.12.20.
// Copyright © 2020 mrousavy. All rights reserved.
2021-02-19 08:28:05 -07:00
//
import AVFoundation
extension AVAuthorizationStatus {
var descriptor: String {
switch self {
case .authorized:
return "authorized"
case .denied:
return "denied"
case .notDetermined:
return "not-determined"
case .restricted:
return "restricted"
@unknown default:
fatalError("AVAuthorizationStatus has unknown state.")
}
}
}