I am using AVAudioPlayer
and NSFileHandle
to do audio streaming. The basic idea is that I save the streaming audio data to the device with file sys
[[UIApplication sharedApplication] beginReceivingRemoteControlEvents];
UIBackgroundTaskIdentifier newTaskId = UIBackgroundTaskInvalid;
newTaskId = [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:NULL];
/* And in info.Plist file Required background modes : App PLAYS Audio */