Skip to content

Instantly share code, notes, and snippets.

@barisuyar
Created December 6, 2021 13:10
Show Gist options
  • Select an option

  • Save barisuyar/2d23054dd173db40674599e505270cef to your computer and use it in GitHub Desktop.

Select an option

Save barisuyar/2d23054dd173db40674599e505270cef to your computer and use it in GitHub Desktop.
MicrophonePermission
struct MicrophonePermission: Permission {
var status: AVAudioSession.RecordPermission {
AVAudioSession.sharedInstance().recordPermission
}
func request(completion: @escaping (AVAudioSession.RecordPermission) -> ()) {
AVAudioSession.sharedInstance().requestRecordPermission { _ in
completion(self.status)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment