How to Lock Yourself Out of Your Phone (or One App) for an Hour, on iPhone and Android
The short version: To lock yourself out of your whole phone for an hour, lock it into one app. On iPhone, Guided Access (Settings > Accessibility > Guided Access) keeps the phone in one app, like your notes or a flashcard app, with a time limit, and only the Guided Access passcode ends it early. On Android, app pinning does a lighter version. To lock yourself out of one app, like Instagram or YouTube, block its category in a Screen Time Schedule or Time Allowance on iOS 27 (an App Limit on iOS 26 and earlier), or use Focus mode on Android. Whichever you choose, let a friend type in the passcode. A lock you can undo yourself rarely lasts past the first hard question.
You put your phone face down. Two minutes later it's in your hand, and you didn't decide to pick it up. You put it in a drawer. You open the drawer. If you search for help, you get pages about what to do when you've forgotten your passcode and the phone is locked by accident.
This guide is about locking it on purpose. We've had many evenings where we wished the phone would just say no for an hour, so here is every built-in way we could verify, plus the one step that makes them stick.
One warning first: don't try to lock yourself out by typing wrong passcodes. Apple's fix for an iPhone stuck on the "Unavailable" screen ends with erasing it, which permanently deletes your data.
Which lock do you need?
| You want to... | iPhone | Android |
|---|---|---|
| Lock the whole phone except one app, for an hour | Guided Access with a time limit | App pinning |
| Lock yourself out of one app, like Instagram or YouTube | iOS 27: Time Allowance or Schedule for its category. iOS 26: App Limit | Focus mode, or an app timer with a PIN |
| Lock apps during certain hours every day | Screen Time Schedule (iOS 27) or Downtime (iOS 26) | Focus mode schedule |
| Stop yourself undoing it | A Screen Time passcode a friend sets | An App limits PIN a friend sets |
Lock your whole phone into one app for an hour
This is the closest thing to "lock myself out of my phone" that a phone has built in. You pick the one app you need, like a notes app, Anki or your class app, and the phone stays there.
iPhone: Guided Access
Apple says Guided Access lets you temporarily restrict iPhone to a single app. It sits in the Accessibility settings, and it works well for studying too.
- Go to Settings > Accessibility > Guided Access and turn on Guided Access.
- Tap Passcode Settings, then Set Guided Access Passcode. Hand the phone to a friend or sibling and let them type a code you don't know. Leave the Face ID or Touch ID option off, or your own face will end the session.
- Open the app you want to study in.
- Start Guided Access with Siri, Control Center or the Accessibility Shortcut.
- Tap Session Settings, turn on Time Limit, and set it to an hour. Tap Done, then Start.
To end the session early, you triple-click and enter the Guided Access passcode. If you don't know it, you wait out the hour.
Android: App pinning
App pinning keeps one app on screen until you unpin it.
- Open Settings, then Security (or Security & location), then Advanced > App pinning, and turn it on.
- Open the app you want, swipe up to the middle of the screen and hold, tap the app's icon at the top, then tap Pin.
Unpinning asks for your phone's PIN, pattern or password, so it adds a step rather than a real lock, and it has no timer. It works best as a speed bump for the moments you reach for the phone without thinking. Menus differ a little by phone maker, and on Pixel some steps need Android 11 or later.
| Study | Design | Finding |
|---|---|---|
| Apple (2026) iPhone User Guide | Official guidance (report) | Guided Access keeps an iPhone inside one app until the session ends. |
| Apple (2026) iPhone User Guide | Official guidance (report) | Ending a Guided Access session takes a triple-click and the Guided Access passcode. |
| Google (2026) Android Help | Official guidance (report) | App pinning keeps one app on screen until you unpin it. |
| Google (2026) Android Help | Official guidance (report) | With app pinning on, unpinning asks for the phone's PIN, pattern or password. |
Lock yourself out of one app
Sometimes the phone is fine and one app is the problem. Here is how to close just Instagram, TikTok or YouTube.
iPhone with iOS 27
On iOS 27, Time Allowances and Screen Time Schedules take the place of App Limits and Downtime. Apple's iOS 27 guide describes both as working by category, such as Social Media, Entertainment or Games, rather than by single app.
For a daily cap: go to Settings > Screen Time > Time Allowances, tap the category the app is in (Social Media for Instagram, for example), and drag the slider down.
For set hours, like 4 to 7 p.m. on school days: go to Settings > Screen Time > Screen Time Schedule, turn on Schedule, tap Add Schedule, choose the days, then tap a time window and leave that category out of it.
Two things to know. Apple says these features need version 27 on every Apple device on your account, so an old iPad can hold you on the older system. And because they work by category, blocking Social Media blocks all of it. Put the apps you need, like Messages or a class app, under Settings > Screen Time > Always Allowed.
iPhone with iOS 26 and earlier
On iOS 26 you can still pick a single app. Go to Settings > Screen Time > App Limits > Add Limit, tap a category to see its apps, select the app, tap Next and set the time. For a fast lock-out for the rest of the day, Settings > Screen Time > Downtime > Turn On Downtime Until Tomorrow works.
Apple warns that by default, limits can be ignored once you reach them. A Screen Time passcode, set by someone else, is what turns the reminder into a lock.
Android
Settings > Digital Wellbeing > Focus mode pauses the apps you choose. Google says that while it's on, you can't use them and won't get their notifications. Tap Turn on now for a study hour, or Set a schedule for the same hours each day. Focus mode has a Take a break button that unpauses everything for a while, so notice how often you press it.
For a stronger lock on one app, use an app timer with a PIN. Go to Settings > Digital Wellbeing > App limits > App limits PIN, turn on PIN for app time limits, and set a four-digit PIN. Then set the app's timer to zero. Google's own tip is that a PIN plus a zero-minute limit blocks an app completely.
For the full steps on scheduled blocking, see how to block apps for certain hours.
Hand someone else the code
Every lock above has the same weak spot: if you know the code, you can undo it at the exact moment you least want to study. Research on self-imposed phone limits shows how often that happens. In a 2025 experiment, 467 adults agreed to block mobile internet on their phones for two weeks, and only about a quarter kept it on for at least 10 of the 14 days.
| Study | Design | Finding |
|---|---|---|
| Castelo N et al. (2025) PNAS Nexus | Randomised trial 467 participants who committed to the block | Only about a quarter of the people who agreed to block mobile internet kept the block on for at least 10 of the 14 days. 119 of 467 (25.5%) compliant |
| Apple (2025) iPhone User Guide | Official guidance (report) | On iOS 26 and earlier, Screen Time limits can be ignored once reached unless you change the default. |
| Apple (2026) iPhone User Guide | Official guidance (report) | On iOS 27 the Screen Time passcode for your own settings sits under Passcode & Management. |
| Google (2026) Android Help | Official guidance (report) | Android's Digital Wellbeing now has an App limits PIN, so app time limits can only be changed by someone who knows the PIN. |
| Google (2026) Android Help | Official guidance (report) | Google suggests a PIN plus a zero-minute limit to block an app completely. |
So give the code away:
- On iPhone, go to Settings > Screen Time > Passcode & Management > Lock Screen Time Settings and let a friend choose the Screen Time passcode. For Guided Access, they set that passcode too.
- On Android, let them type the App limits PIN.
- Pick someone who's around but won't give in the moment you ask: a sibling, a roommate, a study partner. Agree in advance when they'll unlock it, like "after 8 p.m." or "when I show you the finished worksheet".
If someone else already manages your phone, like a parent through Family Sharing or Google Family Link, these settings may already be theirs. Ask them to add the limit with you. You're the one asking for less phone, which makes it an easier conversation to start.
Where Unglue fits
Unglue is built around this idea. You choose the apps that eat your study time, and they stay blocked until you earn minutes with real-life habits. Start a timed habit such as Study on the Focus tab and you earn coins for every focused minute, which you can spend on those apps later if you want. You can schedule the block for study hours. With Selection Lock, a friend holds a Buddy Code you need before you can take apps off the blocked list, and adding apps is always free. It works on iPhone, where it uses Apple's Screen Time framework, and on Android.
Yes, it's an app for locking you out of apps. We know.
If you want a timer that locks the phone for each study block, see Pomodoro apps that lock your phone. For more apps that make you earn the unlock, see apps that make you earn screen time by studying. And for the rest of a study session, read how to stop scrolling while studying.
Common questions
How do I lock myself out of my phone for an hour?
On iPhone, use Guided Access: turn it on under Settings > Accessibility > Guided Access, let a friend set the passcode, open one app, start Guided Access, and set a one-hour Time Limit under Session Settings. On Android, app pinning keeps one app on screen, though it has no timer. Focus mode can pause chosen apps for as long as it's on.
How do I lock myself out of an app on iPhone?
On iOS 27, use a Time Allowance or a Screen Time Schedule for the app's category under Settings > Screen Time. On iOS 26 and earlier, use App Limits > Add Limit and pick the single app. Let a friend set the Screen Time passcode so you can't change it yourself.
How do I lock myself out of Instagram or social media?
Block the Social Media category with a Time Allowance or Screen Time Schedule on iOS 27, or an App Limit on Instagram on iOS 26. On Android, add Instagram to Focus mode, or set its app timer to zero behind an App limits PIN. Deleting the app for a month also works, though reinstalling takes a minute.
How do I lock myself out of YouTube?
The same way as any app: an App Limit on iOS 26, its category's allowance or schedule on iOS 27, or Focus mode on Android. If you need YouTube for a class video, open that one video on a laptop and keep the app locked on the phone.
Can I lock apps on iPhone during certain hours?
Yes. On iOS 27, create a Screen Time Schedule under Settings > Screen Time > Screen Time Schedule with time windows that leave out the categories you want closed. On iOS 26 and earlier, use Downtime and turn on Block at Downtime.
What if I need my phone in an emergency?
Guided Access keeps the phone in one app, so before you start, decide how someone can reach you, like a parent who knows to call the landline or a friend nearby. With Screen Time, apps and contacts under Always Allowed stay available whatever your limits say.
Sources
- Apple, Use Guided Access with iPhone.
- Apple, Set Screen Time Schedules and Time Allowances in Screen Time on iPhone, iOS 27.
- Apple, Set schedules with Screen Time on iPhone, iOS 26.
- Apple, Create, change, or remove a Screen Time passcode on iPhone, iOS 27.
- Apple, If you forgot your iPhone passcode, reset your device without a computer.
- Google, Pin & unpin screens.
- Google, Manage how you spend time on your Android phone with Digital Wellbeing.
- Castelo N. et al., "Blocking mobile internet on smartphones improves sustained attention, mental health, and subjective well-being", PNAS Nexus, 2025.