Possible to detect when the phone is unlocked? (As in "slide to unlock")

Discussion in 'iOS Programming' started by robotspacer, Sep 29, 2008.

  1. robotspacer macrumors member

    Joined:
    Jun 25, 2007
    #1
    Basically I'd like to have my app update automatically when the phone is unlocked. Obviously this would only work if the app is already running—that's fine. Any ideas on how to accomplish this, or even if it's possible? Maybe a notification I can use with NSNotificationCenter...?

    Unfortunately searches aren't helping much—every result is about the other kind of unlocking!
     
  2. Luke Redpath macrumors 6502a

    Joined:
    Nov 9, 2007
    Location:
    Colchester, UK
    #2
    UIApplicationDelegate:

    As the docs say, it also posts a notification so you could use NSNotificationCentre to respond to this elsewhere in your code.
     
  3. robotspacer thread starter macrumors member

    Joined:
    Jun 25, 2007

Share This Page