Search code examples
iosiphoneios6ios7

Changing the behavior of the iOS Lockscreen


Is there a way to change the behavior of the iOS Lockscreen? For instance, can an app, if active, provide a user with dynamic content, such as pictures, as the phone's background, and, in addition, allow a user to swipe left (in addition to swiping right, if they want to unlock the phone) to engage said content?


Solution

  • Is there a way to change the behavior of the iOS Lockscreen?

    No.

    For instance, can an app, if active...

    No.

    iOS doesn't provide any API that would allow the sort of thing that you describe. It might be possible to modify or replace the lock screen if you jailbreak your phone -- all bets are off at that point. But an app that uses the Apple-provided API has no way to modify the lock screen.

    Also, note that if the device is locked, your app won't be active. You may have intended a looser definition of "active," but looking at the linked chart of app states will help you understand that what you're looking to do isn't achievable with the current API. Apps have to be active to receive events, but a locked phone implies that your app will be in an inactive, background, or suspended state if it's running at all.