Questions tagged [auto-lock]
22 questions
33
votes
5 answers
How to disable iPhone/iPad auto-lock while app is in foreground mode?
I'm developing an music/video player app and just need to konw how to disable the auto-lock while my app is in foreground.
I know I've to use [[UIApplication sharedApplication] setIdleTimerDisabled:YES]; and [[UIApplication sharedApplication]…

jMelnik
- 1,055
- 2
- 15
- 26
17
votes
2 answers
How can I prevent iPhone (including iOS 7) from going to sleep in HTML or JS?
I'm attempting to write some code to keep a phone alive and not go to sleep on a webpage.
In my search, I found this post: Prevent iOS mobile safari from going idle / auto-locking / sleeping?
But looping an audio file seems to no longer keep…

lanewinfield
- 183
- 1
- 1
- 8
14
votes
2 answers
Make the iPhone Screen Dim
I have managed to ensure that the iPhone doesn't auto-lock using:
[[ UIApplication sharedApplication ] setIdleTimerDisabled: YES ];
But how do I make the screen dim after a certain amount of time?
Thanks...
EDIT:
Think I've found a solution…

Adam Waite
- 19,175
- 22
- 126
- 148
14
votes
2 answers
iPod won't sleep when connected to debugger
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…

simon
- 3,380
- 2
- 22
- 23
7
votes
4 answers
How do I close my iPhone App when the screen locks?
I'm writing an App that involves authentication on the initial screen, and allows access to sensitive data on later screens. When the iPhone is locked, either with the lock button or through auto-lock, I would like the App to close itself as a…

Andrew
- 466
- 2
- 7
- 22
6
votes
3 answers
Keep on running an app after the screen auto-locks - Phonegap (Android/iOS)
I am developing an app that tracks the users movement over GPS (bike riding in particular) and I realized that when the screen auto-locks, the app would stop running (if I'm not mistaken, I'm not completely certain on this).
Is there a way to…

dbozhinovski
- 523
- 6
- 19
3
votes
2 answers
disable automatic locking on iphone with iOS 4.3.3
I want to disable the auto lock on my iOS4.3.3 program. I found on the web the same answer several times for this and working for xcode3 but I cant find it to work with mine.. help pls? thks

StinkyCat
- 1,236
- 1
- 17
- 31
3
votes
0 answers
Flutter - iOS devices not sleeping
On iOS our app does not let the device sleep - or Auto-Lock as Apple calls it.
All Android devices sleep fine, no problems.
Our previous native apps (coded in Swift & Obj-C) always sleep on the same iOS devices, which suggests its not the devices at…

richtea
- 51
- 6
3
votes
2 answers
How detect the phone has been locked because of autolock time exceeded in an app?
I need to know if there is an event in the AppDelegate.swift that is triggered when the phone has been locked because of the autolock time exceeded
I have tried to use the applicationDidEnterBackground method but It is not triggered because in that…

Eduardo Escobar
- 33
- 3
3
votes
2 answers
Auto lock does not function when app left open - iOS
I'm developing a messaging app and auto lock doesn't function when app left open. (No single line is related to auto lock in code)
I've used this line to enabling it,
[[UIApplication sharedApplication] setIdleTimerDisabled:NO];
but its not…

aqsa arshad
- 801
- 8
- 27
3
votes
2 answers
auto-lock iphone/ipad programmatically
Is there a way to 'force' the user to have auto-lock (and maybe passcode lock) on while the application is running (for security reasons mainly)? If we can't set them programmatically, can we at least check to see if they are set?
Thanks,
Mihai

Mihai Fonoage
- 478
- 2
- 8
- 23
3
votes
2 answers
Allow "auto lock" while video is being played
No matter whether I am using MPMoviePlayerController or AVPlayer (AVFoundation), the iOS does not allow the device to auto lock (to enter sleep mode) while the video is playing.
I have a case where an extremely slow video is constantly being played…

AndroC
- 4,758
- 2
- 46
- 69
3
votes
2 answers
Implement auto-lock feature for app on iOS
i want to implement a secure timebased auto-lock function for my app (similar to the auto-lock-feature in 1password). The user can chose a passcode and a time period (1,2,3,5,10,30 minutes) after the lock is activated. Basically I could write a…

JHC42
- 35
- 4
2
votes
1 answer
can we access the autolock setting that the user has set in iOS?
I just want to find out what the user has set for the timeout period for autolock, which is in Settings->General->Auto-Lock in iOS. How can I find this?
Thanks,

debuggirl
- 31
- 3
2
votes
1 answer
Set password when closing
I'm trying to lock all sheets with a password when closing a workbook, but allow filtering and searching on tables.
I managed to gather the following which works other than setting the password.
Private Sub Workbook_BeforeClose(Cancel As…

Conor12x
- 39
- 1
- 9