14

I've got my iPod connected to my debugger running in XCode. The auto-lock is set to 1 minute. When the debugger is not running, the iPod goes to sleep after 1 minute of inactivity. However, when the debugger is running, my iPod won't sleep.

This is frustrating because I want to see what methods get called on my app when the iPod goes to sleep.

Does anyone know how to solve this problem?

1
  • Good question. It is still an issue 10 years later. I would like to test some stuff from the app automatically going inactive by the phone sleeping, and the issues I am investigating are specific with auto lock, and while both using the auto lock feature and lock button cause the same notifications/callbacks, how can we be sure there are no behind the scenes system differences? The behavior I am investigating is claimed to be different between the two... Anyway, good question!
    – chadbag
    Aug 13, 2021 at 5:38

1 Answer 1

10

Just lock it manually by pressing the top power/lock button. It calls the same methods (applicationDidEnterBackground:) on iOS devices which support multitasking.

2
  • 4
    Do you have any documentation to verify that pressing the top lock button is the same as the phone going to sleep from inactivity?
    – simon
    Sep 23, 2011 at 21:28
  • 1
    i used the debugger. When the top lock button was clicked applicationdidEnterBackground was called
    – thestig
    Jan 5, 2012 at 23:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.