Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

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
    })
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #record #permission #swift
ADD COMMENT
Topic
Name
6+5 =