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?

simon
  • 3,380
  • 2
  • 22
  • 23
  • 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 '21 at 05:38

2 Answers2

10

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

don
  • 1,497
  • 1
  • 13
  • 27
thestig
  • 109
  • 1
  • 3
  • 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 '11 at 21:28
  • 1
    i used the debugger. When the top lock button was clicked applicationdidEnterBackground was called – thestig Jan 05 '12 at 23:31
-1

Add a logging call to the methods that get called.

Antwan van Houdt
  • 6,989
  • 1
  • 29
  • 52