I am creating Radio application in swift.
Application have list of radio station. When user click on any station they will play radio in foreground as well as background.
Now I have requirement that when user select any radio from list then he can able to add that radio in Playlist. When user select radio for playlist he will be ask for date and time to play selected radio automatically.
Let's say User selected "Radio1" for 10.00 am Monday. Now that radio will be play on every Monday at 10.00 am automatically whether app is on foreground or background.
I tried above task using Local notification. I made function that will play radio when notification fire. But the issue is that Radio is playing when app is in foreground.
My question is how can I call the function when app is on background and notification fire?
If anyone have other idea that how can I achieve this task then please guide me.
Thanks, Ekta