APNs

{ "aps": { "content-available": 1 }, "audio_file_name": "ding.caf", "audio_url": "https://example.com/audio.mp3" }

When the app is in the background or killed, it receives a remote APNs push. The data format is roughly as shown above. How can I play the MP3 audio file at the specified "audio_url"? The user does not need to interact with the device when receiving the APNs. How can I play the audio file immediately after receiving it?

Apps cannot start audio sessions in the background.

There is no supported way for you to do this.

APNs
 
 
Q