I have no code, and as a newbie you should read to understand how it works instead of trying to get someone to give you code that you just copy and paste and be on your way. The link provided is from apple and explains how the whole process works.
You can't keep bumping your thread hoping for someone to give you code. I understand everyone is new at some point and needs help but you have to do your part and read/understand how those processes work if you want to be able to understand anything someone gives you. If someone gives you the bare minimum then you are still going to be stuck since it's not going to accomplish what you want within your app and will still be struggling to get it to work.
You can't keep bumping your thread hoping for someone to give you code. I understand everyone is new at some point and needs help but you have to do your part and read/understand how those processes work if you want to be able to understand anything someone gives you. If someone gives you the bare minimum then you are still going to be stuck since it's not going to accomplish what you want within your app and will still be struggling to get it to work.
ok, meanwhile, I was reading and testing, but it did not work out, it continues to stop playing music when you enter in the background