When the app kills the process. Received APNs push message. Push messages carry voice related information. At the same time as receiving the push, obtain the voice playback of this voice message. How to achieve it?
APNs or UNNotificationServiceExtension
When the app kills the process
What does this mean? Did you mean to say when the "user" kills the process? Or perhaps when the "system" kills the process?
At the same time as receiving the push, obtain the voice playback of this voice message. How to achieve it?
If the app is not running, at best it will be launched in the background. Or if you are using a UNNotificationServiceExtension, it will be processed there.
It is not possible to start playing audio in UNNotificationServiceExtension or in an app that is not in the foreground. Therefore you will need to find an alternate way to implement this.
A solution for this could be to prompt the user to tap the notification, which will launch the app in the foreground, and at that point you can play the audio that has been downloaded through the notification payload.