Is there a way to send event that audio playback ended (AVAudioEngine)?

I use AVAudioEngine in order to play sound in my app. Everything is working properly in case of moving the app from the foreground to the background and vice versa, the only problem is that I need to find a way to send events to the other music stream apps after I finished my playback, so they can continue to play. I'll give an example - I open Spotify (music stream app) and click on the play button so the music starts to play, then I open my app and click on the play button, what happens is - music from Spotify is paused and music from my app starts, then I close my app and nothing happens. The expected result here is - that after I closed my app, Spotify should continue to play the music from that moment where it paused. I assume there should be a kind of event that I should fire after I finished and other streaming apps can catch it and continue. Am I right?

*it could be iMusic instead of Spotify or any other app

There is no expected result because one developer should not influence the behaviour of another developer's app hence the sandbox. The API doesn't work like that.

There is a great answer for this question - https://stackoverflow.com/a/71678102/5709159

@MobileTen I know there is a kind of system event that at least can notify other apps about finishing playback.

Is there a way to send event that audio playback ended (AVAudioEngine)?
 
 
Q