App not running in background

My app has two background modes: location and audio. It used to run in the background and play audio and recieve locaiton updates through the delegate just fine. Recently, I changed something and I broke that. Now my app "pauses" in the background. I've tested this through having a variable increment up 1 every second, and I've found it stays the same while the app is not running. The weird thing is: I've done this same test on a simulator — not on a real device like the other test — and it works just fine. The app runs in the background, recieves lcoation updates, and keeps playing music in the simulator. This makes me think it's not something wrong with my code or my background modesm, but some weird setting somewhere. How can I fix this? This a very pressing issue.

Replies

The weird thing is: I've done this same test on a simulator — not on a real device like the other test — and it works just fine.

This is not in and of itself weird. The simulator is not a good way to test background execution.

Now my app "pauses" in the background.

After how long? Every night? Or after a few minutes? Or seemingly at random?

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"