You should check this criterion:
... obviously, replace the "// insert" code with any functionality that is relevant in your application.
3> Finally, for this function to be called, insert this into the viewDidAppear event:
[[UIApplication sharedApplication] beginReceivingRemoteControlEvents]; if ([self canBecomeFirstResponder]) { [self becomeFirstResponder]; }
also see this link: http://www.sagorin.org/2011/11/29/ios-playing-audio-in-background-audio/
source share