AVAudioPlayer starts playing music when a local notification is shown to user. After clicking the notification and app runs in foreground I could not stop the music only in iOS 7.1.2. But I can stop it in iOS 8+.
Has anyone heard any iOS 7.1.2 bug about this issue reported by Apple?
I use the same instance that I start playing the music.
// start playing the music
[self.player prepareToPlay];
// Stop playing the music
[self.player stop];
[self.player setCurrentTime:0.0f];
For playing use:
For pausing/stopping use: