You want your
instance to resume playing after an interruption on an iOS device, such
as an incoming call.
methods of the
protocol in the delegate object of your
/* Audio Session is interrupted. The player will be paused here */
On an iOS device, such as an iPhone, a phone call could interrupt
the execution of the foreground application. In that case, the audio
session(s) associated with the application will be deactivated, and
audio files will not be played until the interruption has ended. At the
beginning and the end of an interruption, we receive delegate messages
AVAudioPlayer informing us
of the different states the audio session is passing through. After the
end of an interruption, we can simply resume the playback of
Incoming phone calls cannot be simulated with iPhone Simulator. You must always test your applications on a real device.
When an interruption occurs, the
audioPlayerBeginInterruption: delegate method
AVAudioPlayer instance will be called. Here your audio session has been deactivated. ...