Creating an app for walking. I will explain the essence of the application. There is a training program for walking from sequential exercises, for example:
Warm-up 5 min.
Walking 15 min
Running 5 min
The main purpose is that the user turns on the music (or not), puts this application in the background and starts training. It is necessary that at the end of each timer, i.e. first 5 minutes, then 15 minutes, etc. the application notifies about it. (As an example of an application where everything works as it should: walking by BetterMe) to play a sound notification, I use AVSpeechSynthesizer (may not be the best choice), i.e. when the timer trigger is triggered, the application explicitly says “ " warm-Up is complete, go to walking”. In the foreground everything works perfectly, and how to set up work in the background is unclear. All the necessary Capabilities are connected. Is there a way to play AVSpeechSynthesizer through local notifications of UNUserNotificationCenter ? The main thing is to play the speech after the timer expires.