Background Modes - Audio | raywenderlich.com


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/8428-background-modes-audio

Can an app perform http calls when the phone is locked? If so how?

@hococoder Can you please help with this when you get a chance? Thank you - much appreciated! :]

In this particular case, yes, it can. The background mode for audio allows it to maintain the http call and keep audio streaming into the app, even while in the background. There are other cases where an app can wake up, make a quick call to the web, and then go “back to sleep” to get data - that’s a background fetch, which I talk about in another screencast. So the real answer is “it depends on what you want to do! (and whether Apple allows that case)”