Skip to content

Developer Notes

Garrett Johnson edited this page May 14, 2024 · 4 revisions

Debugging & Testing

iOS Background Refresh

Testing must be performed on a real device.

  1. Start the app
  2. Send app to background to schedule tasks
  3. Pause execution
  4. Paste launch command into the debugger
    • For maintenance:
      e -l objc -- (void)[[BGTaskScheduler sharedScheduler] _simulateLaunchForTaskWithIdentifier:@"net.devsci.den.maintenance"]
    • For refresh:
      e -l objc -- (void)[[BGTaskScheduler sharedScheduler] _simulateLaunchForTaskWithIdentifier:@"net.devsci.den.refresh"]

Further reading: https://developer.apple.com/documentation/backgroundtasks/starting-and-terminating-tasks-during-development

Clone this wiki locally