Guest User

Untitled

a guest
Feb 20th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. SFSpeechRecognizer.requestAuthorization { [weak self] (authStatus) in
  2.  
  3. var isAuthorization = false
  4.  
  5. switch authStatus {
  6. case .authorized:
  7. isAuthorization = true
  8.  
  9. case .denied:
  10. isAuthorization = false
  11. print("User denied access to speech recognition")
  12.  
  13. case .restricted:
  14. isAuthorization = false
  15. print("Speech recognition restricted on this device")
  16.  
  17. case .notDetermined:
  18. isAuthorization = false
  19. print("Speech recognition not yet authorized")
  20. }
  21. }
Add Comment
Please, Sign In to add comment