Answers for "how to give recording permission in swift"

0

record permission swift 4

import AVFoundation

switch AVAudioSession.sharedInstance().recordPermission {
case AVAudioSessionRecordPermission.granted:
    print("Permission granted")
case AVAudioSessionRecordPermission.denied:
    print("Pemission denied")
case AVAudioSessionRecordPermission.undetermined:
    print("Request permission here")
    AVAudioSession.sharedInstance().requestRecordPermission({ (granted) in
        // Handle granted
    })
}
Posted by: Guest on October-12-2021

Code answers related to "how to give recording permission in swift"

Code answers related to "Swift"

Browse Popular Code Answers by Language