Search code examples
iosobjective-calarm

How to create a custom alarm wake up screen on iOS?


Is it possible to create a custom alarm wake up screen on iOS via Xcode, such as the carrot alarm app on the App Store? If so, could anyone point to some documentation or examples?

I'm pretty confused at the moment, because I don't understand how it can be done as long as the iPhone locks itself and the app stops working. This is my main concern, because locking the iPhone kills the app.

I would like to what's the best way to create a wake up screen like carrot app's one, avoiding all the screen lock problems. How did they do it?

Thanks


Solution

  • Using the code below you can disable the lock screen. You can place it in your viewDidLoad method.

    [[UIApplication sharedApplication] setIdleTimerDisabled: YES];
    

    As for creating the screen, I'd suggest picking up a book on iPhone development as it's a lot to explain in a follow-up message.