swift – iOS, How to handle speak out text and voice command when accessibility is OFF in Settings?


I am working on an iOS app which has voiceOver (speak out) and voice control (voice command) features. Currently this is working fine when uses turned ON both voiceOver and voice control in settings > accessibility.
Now client asked me, do same functionality even both voiceOver and voice control turned OFF in settings.

Please suggest me will apple approve app if I use third parties library code to work voiceOver (speak out text) and voice control (voice command)? If Apple has no issue, then please tell me some good library names. Many thanks.

I tried how to check voice over is OFF / ON in settings via using below, and if it is ON then we and do like this:

if UIAccessibility.isVoiceOverRunning {
     print("isVoiceOverRunning: YES")
  }else {
    print("isVoiceOverRunning : NO")
 }

UIAccessibility.post(notification: UIAccessibility.Notification.announcement, argument:"This is test string")

But I think there is no API to check voice control is OFF/ ON in settings.

Now I have to check can we achieve speak out text (label & button) and voice command when accessibility is OFF in settings. Thanks in advance.

Latest articles

spot_imgspot_img

Related articles

Leave a reply

Please enter your comment!
Please enter your name here

spot_imgspot_img