Prevent user from locking/sleeping iPhone?

Discussion in 'iOS Programming' started by Matt342, Aug 11, 2008.

  1. Matt342 macrumors regular

    Joined:
    Jul 20, 2007
    #1
    Hi!

    Is there any way I can prevent the user from locking (sleeping) an iPhone (so when the user presses the top button nothing happens)?

    Thanks!!

    ~Matt
     
  2. grimjim macrumors member

    Joined:
    May 24, 2003
    #2
    I suspect that this is impossible using the SDK. At least, I hope it is.
    Possibly a silly question, but why would you want to prevent your users from switching off their own phones while running your app? I don't think I'd be happy using an app that did something like that. And I suspect that it wouldn't pass Apple's vetting procedures, either.
     
  3. mkrishnan Moderator emeritus

    mkrishnan

    Joined:
    Jan 9, 2004
    Location:
    Grand Rapids, MI, USA
    #3
    Yeah, I have to agree... I would consider this a security violation... I would want Apple to make this impossible in the SDK and/or vet out apps that try to do this.
     

Share This Page