Before posting this question I search on internet and here on StackOverflow, but I didn't found how to play a song not in background.
Every "Play local song tutorial" shows how to play the song in background, but I need to play it so that when you open Control Center and swipe to right it shows the name, cover and the play/pause button of the song, like normal song do.
Another problem of playing songs in background is that when the app get close, is automatically stop the song, and thats not the idea of a mp3 app.
I have tried AVFoundation
and MediaPlayer
, even SwiftySound, but they all play the song in background.
Any idea on how can I play a local song not in background?
Thanks