AVSpeechSynthesizer works on simulator but not on device

僤鯓⒐⒋嵵緔 提交于 2019-12-01 17:54:46

Do you have the phone in silent mode? That silences the synthesizer as well.

It's not working because of the Mute mode of your phone. To turn 'Mute On' in iOS 7, you have to follow the following steps:

  • Go to your Setting option
  • Go to Accessibility
  • Go to AssistiveTouch
  • Turn on AssistiveTouch option from the switch button
  • Then a Moving Assistive icon, will appear on you device screen.
  • Touch on it to expand with more options
  • From there select Device and Touch Un mute option.

Now run the project and hope it will work.

P.S: (In iOS 8.0 this code wouldn't work, because for an unexpected bug, from iOS8.1 they remove it and it is now working perfectly) Hope it works. :)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!