0

I have my app (which does text-to-speech using AVSpeechSynthesizer) set up to toggle play/pause from the lock screen. It works, meaning when i press pause, the audio stops however the pause button doesn't change to a play icon, it remains in a pause state.

When I receive the pause event, I invoke avSpeechSynth.stopSpeakingAtBoundary(AVSpeechBoundary.Immediate).

This was all working fine when I released my app but this started happening with a recent iOS update (8.2 I think).

Any help is much appreciated.

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Bret
  • 883
  • 1
  • 9
  • 18
  • It is not up to you to change the _icon_ in the lock screen, so this isn't something that _you_ are doing wrong. If it still works as a toggle, i.e. it pauses when tapped, and then plays when tapped again, you've done all you can do. If you can document this change in behavior clearly, file a bug report with Apple. – matt May 03 '15 at 00:50
  • Understood but visually it doesn't make sense that internally my app is paused but that it is not reflected on the lock screen. Just wondering if there is something i can do to make it work seamlessly – Bret May 03 '15 at 00:52
  • The problem is that you may be doing something you're not supposed to do. Perhaps your app is not actually a sound player, and you should not be getting background sound playing privileges just to use the speech synthesizer. Of course I could just be wrong about that. Are you using some additional trickery here that you are not showing? – matt May 03 '15 at 00:53
  • No trickery, not intentionally anyway. My app reads long form articles so it makes perfect sense to be available from the lock screen – Bret May 03 '15 at 01:38
  • Well, since you say this behavior changed, what I would do is try to package it up in a way that shows that fact to Apple and submit it as a bug report. – matt May 03 '15 at 02:52
  • The state of the play/pause button is determined by MPNowPlayingInfoCenter's MPNowPlayingInfoPlaybackRate. See this answer for an implementation example: http://stackoverflow.com/a/33274631/133485 – bruce1337 Oct 24 '15 at 00:27

0 Answers0