Search code examples
iosxcodebackground-fetch

App not stopped when launched for background fetch from Xcode


When I launch my app from Xcode with Background Fetch mode, it works. But it should stop when I call callback handler, or after 30 seconds. But it does not! When I click Pause, I may see my main thread does not do anything.

Is it some xcode-specific issue, or do I misunderstand something about background fetch?


Solution

  • Apps running under the Xcode debugger are not subject to the same background execution time limitations as a released app.

    For example, if you looped, logging UIApplication property backgroundTimeRemaining on a released app, your app would be terminated when this value reached zero. Under the debugger your app would continue indefinitely, reporting a zero value.