Reputation: 1965
Is it possible to start playing 'MPMusicPlayerController' when the app is in a background state? I have an alarm clock app and I would like to start playing music when the alarm goes off and the app isn't in the foreground.
Upvotes: 0
Views: 263
Reputation: 2589
Go to project properties -> Capabilities and switch on the Application Background Modes
Then in your plist file add the following key:
Now just play the music in when your timer sets off.
Upvotes: 1