iPhone

How to Put Password on Apps using iPhone Shortcuts

How to Put Password on Apps using iPhone Shortcuts

A friend asks to borrow your phone for a minute, and it’s already unlocked. Your banking app and your messages are sitting right there, and so is the photo library.

Shortcuts can cover that gap without any third-party app. A Personal Automation watches for a chosen app to open. When it does, the iPhone either goes back to the Lock Screen or shows a prompt for a typed password, and a wrong entry locks the phone.

Be realistic about what this is. MacMost classes the technique as low security for an already unlocked device.

If you’re on iOS 18 or later, there’s a native lock for most apps, and it does something a shortcut can’t. Apple says it keeps locked-app content out of notification previews, search and Siri suggestions.

How to Lock an App With Shortcuts Using Your iPhone Passcode

Build a Personal Automation with an App trigger set to Is Opened, and give it one action, Lock Screen. Open the chosen app and the iPhone drops to the Lock Screen, where it asks for Face ID or Touch ID, with the device passcode as the fallback.

Apple built automations into shortcuts on iOS 27, so the separate Automation setup flow is gone. Per Apple’s guide, you tap a shortcut (or create a new one), tap Edit, then Automation, and pick a trigger, which sits at the top of the shortcut. The numbered steps and menu names below follow iOS 16.4 through iOS 26. On iOS 27 the same switches live in the shortcut editor, so test the result on your own iPhone.

What you need first

You need iOS 16.4 or later, because that release shipped the Lock Screen action. AppleInsider’s March 2023 rundown lists it among the new Shortcuts actions. A device passcode is required as well, ideally alongside Face ID or Touch ID, and the Shortcuts app comes preinstalled.

Personal automations are device-specific, and what that means depends on your iOS version. On iOS 26 and earlier, Apple’s Shortcuts guide says they are backed up to iCloud but do not sync, so repeat the setup on every iPhone you want covered. iOS 27 changed that. Apple’s release notes say automations now sync between devices, and Apple’s current guide says they arrive on your other devices switched off, so turn the automation on there.

Build the passcode lock

  1. Open the Shortcuts app and tap the Automation tab.
  2. Tap the plus button (or Create Personal Automation if this is your first one).
  3. Scroll down and tap App.
  4. Tap Choose, pick the apps you want locked, and tap Done. Leave Is Opened selected.
  5. Tap Next, then Add Action, search for Lock Screen and tap it.
  6. Tap Next, switch on Run Immediately, and tap Done.

One automation covers every app you pick in step 4. Choosing Is Closed instead fires the lock when you leave the app, which is the wrong moment.

Get Face ID set up properly before you test, because the Lock Screen action hands the unlock check straight to it.

There’s one oddity. According to 9to5Mac’s iOS 16.4 walkthrough, the action locks the phone but keeps the screen lit for a few moments. A 2023 Apple Community thread describes the same behavior, with Face ID unlocking the phone again instantly when the owner is looking at it.

How Do You Set a Custom Password on an App in Shortcuts?

YouTube player

Stack Ask for Input and an If action on the app automation, then drop Lock Screen into the If branch. A prompt appears when the app opens, and the iPhone locks unless the typed entry matches the password you stored.

Apple’s guide describes the If action as doing one thing when a condition is true and something else when it isn’t. It marks its branches with If, Otherwise and End If.

  1. Create the App automation exactly as in the passcode method (Is Opened, apps chosen), then tap Next.
  2. Tap Add Action, search for Ask for Input and add it.
  3. Set the Input Type to Number or Text, and change the prompt to something short like “Enter password”.
  4. Add an If action. It picks up the answer from Ask for Input as its input on its own, so set the condition to “is not” and type your password as the value.
  5. Tap Add Action inside the If branch and add Lock Screen.
  6. Leave Otherwise empty, so the app stays open after a correct entry.
  7. Tap Next, switch on Run Immediately, and tap Done.

Try a wrong password and the right one. Then tap Cancel on the prompt and see what the phone does.

Text or number?

Apple Support says Ask for Input accepts words, dates or numbers, and the keyboard adapts to each type.

A number gives you the numeric keypad, which is quick to type with one thumb. Text allows a longer passphrase, though you pay for it with the full keyboard every time you open the app.

Passcode lock or custom password?

The passcode lock fits a phone that gets shared with family, and nothing is stored in plain text. The custom password makes more sense when you hand over an unlocked phone and the other person shouldn’t need your device passcode. It also lets you give each app its own prompt, as long as you build a separate automation for each one. And if Face ID is unreliable on your iPhone because of a mask or a bad angle, typing beats waiting for the scan to fail.

For most people the passcode lock wins. The custom password sits inside the shortcut itself, readable by anyone who opens it.

How to Stop the Confirmation Prompt From Blocking the Lock

Without a fix here, the automation only posts a banner that someone has to tap, and the app stays open until they do. On iOS 17 through 26, switch the automation to Run Immediately. On iOS 27, turn off Confirm Before Run, and on iOS 16 and earlier, turn off Ask Before Running.

Apple’s Shortcuts guide confirms the default: a new personal automation notifies you when its event occurs and asks to run, and you can edit it to run without asking.

SettingWhat it doesSet it to
Run Immediately (iOS 17 to 26)Runs the lock the moment the app opensOn
Confirm Before Run (iOS 27)Waits for a tap before runningOff
Ask Before Running (iOS 16 and earlier)Waits for a tap on the bannerOff
Notify When RunPosts a banner after the automation firesOff, to cut the clutter

On iOS 27, also tap Edit, then the Info button, then Privacy, and check that Allow Running When Locked is on. Apple’s guide says the automation then will not notify you when it is triggered.

The App trigger is on Apple’s list of automations that can run automatically (older versions of the guide call it Open App). Matthew Cassinelli’s write-up on the iOS 17 betas describes Run Immediately arriving as an alternative to the default Run After Confirmation, for nearly every trigger type.

If the lock still waits, Apple adds that individual actions may need their own run-automatically setting, so check the Ask for Input and Lock Screen actions after the automation itself.

Hiding an App and Opening It Through a Password Shortcut

The idea is a Home Screen shortcut that stands in for the real app. It asks for the password and only opens the real app if the answer is right, while the real app itself gets moved out of sight.

  1. Make a new shortcut with Ask for Input, then If (Provided Input is your password), and put Open App for the real app inside the If branch.
  2. Open the shortcut’s Details and tap Add to Home Screen. Apple’s guide lets you pick a custom photo or file as the icon.
  3. Touch and hold the real app, tap Remove App, then Remove from Home Screen. Apple notes the app stays available in the App Library.

A matching icon makes the launcher blend in, and the steps for changing app icons on iPhone cover the rest of that setup.

Here’s the flaw. The real app is still one swipe past your last Home Screen, inside the App Library, where anyone can tap it without a prompt.

An Apple Support Community guide adds that a removed app still turns up in Search and Siri suggestions. Tapping the launcher also shows a Shortcuts banner and your password prompt before the real app opens. Apple’s older guide said the full Shortcuts app opens first, but MacRumors reported that stopped in iOS 14.3.

This variant makes sense when you want a visible password box every time, with no lock-and-bounce, or when the device runs iOS 16.3 or earlier and has no Lock Screen action. Skip it if someone else knows to check the App Library or Search, or if other apps or links open the real app directly.

When a Shortcuts App Lock Does Not Protect Your Data

It stops casual snooping on a phone you have already unlocked, and that is the whole job. MacMost calls it a low-security technique for keeping others out of chosen apps on an unlocked device.

The custom password sits in the If condition in plain text, so anyone who opens the shortcut can read it. The off switch is no better guarded. Apple’s guide has you tap the automation and turn off Enable This Automation (iOS 26 and earlier), which means whoever holds the unlocked phone can disable the lock in a few taps.

The automation also only reacts when the app opens. Notification previews, Search results and Siri suggestions keep showing what is inside the app, while Apple says a natively locked app keeps its information out of notification previews, search, Siri suggestions and call history.

And the passcode lock accepts the device passcode, so anyone who knows it walks straight in.

That’s fine for handing an unlocked phone across a table. It’s the wrong tool for banking or health records, for work email, and for any thief who already has the phone unlocked.

If the person holding the phone is a child, the built-in parental controls on iPhone restrict apps without relying on a shortcut at all.

Once someone gets past the prompt, the device passcode and the app’s own lock (where it has one) are what’s left, along with the native lock covered below.

Why Is the Shortcuts App Lock Not Working?

Start with whether the automation is switched on and whether the right app is in the trigger. After that, look at the run setting, which may still be waiting for a tap, and at the iOS version, since an iPhone older than 16.4 has no Lock Screen action at all.

SymptomLikely causeFix
Nothing happens when the app opensAutomation disabled (on iOS 27 a synced copy arrives switched off), or the app is missing from the triggerTurn Enable This Automation back on, re-pick the app
Banner appears, app opens anywayConfirmation still requiredTurn on Run Immediately (iOS 27: turn off Confirm Before Run)
Lock Screen action is missingiOS older than 16.4Update iOS, or use the launcher variant
Automations stop runningThe Shortcuts app itself is lockedRemove that lock (see below)

When locking the Shortcuts app breaks the automation

One Apple Community poster locked the Shortcuts app with Face ID on iOS 18.1 and found that scheduled automations then needed Face ID to run, with no Don’t Require Face ID option on the icon.

Sources disagree on whether Shortcuts can be locked at all. Apple’s own list of apps iOS 18 cannot lock includes Shortcuts, yet that poster and a second Apple Community poster describe locking it. Behavior may differ by iOS release, so test on your own iPhone.

My rule of thumb is to leave the Shortcuts app unlocked whenever automations drive anything else on the phone.

Shortcuts or iOS 18 Face ID: Which App Lock Fits Your iPhone?

On iOS 18 or later, use the native lock. Touch and hold the app icon, tap Require Face ID (or Touch ID or Passcode), then tap it again and authenticate.

The Shortcuts methods stay useful on iOS 16.4 to 17.x, or when you want a typed password that is not the device passcode.

MethodUnlocked withWhere it falls short
Shortcuts passcode lockFace ID, Touch ID or device passcodeAny unlocked-phone holder can switch it off
Shortcuts custom passwordTyped passwordPassword stored in plain text in the shortcut
iOS 18 Require Face IDFace ID, Touch ID or passcodeSome Apple apps are excluded
Screen Time App LimitsScreen Time passcodeLimits minutes, not each opening
Guided AccessGuided Access passcode or Face ID to exitLocks the phone to one app at a time

What the native lock does that a shortcut cannot

The biggest gap is leakage. The native lock hides the app’s information from notification previews, search, Siri suggestions and call history, and a shortcut does none of that.

For apps you download, it also offers Hide and Require Face ID, which moves the app out of the Home Screen (apps that come with iOS cannot be hidden). The setting stays on the device where you set it, with no iCloud sync. One catch for families: it is unavailable to children under 13 in a Family Sharing group, though age thresholds vary by country or region.

Apps iOS 18 will not lock

The built-in apps Apple’s own list says cannot be locked are Calculator, Camera, Clock, Contacts, Find My, Maps, Shortcuts and Settings. Early reports were a little off. iDropNews, reporting on the iOS 18 beta, named Settings, Camera, Maps, Find My, Contacts and Clock, and some hands-on reports also mention Watch, which is not on Apple’s list.

Check the long-press menu on your own iPhone.

Screen Time and Guided Access

Screen Time’s App Limits set a daily allowance for apps or categories, and a Screen Time passcode keeps those settings in place. It caps minutes rather than asking for a password at each opening, which is why Screen Time on iPhone suits time control better than privacy.

Guided Access works differently. It limits the device to a single app, and a session ends with the Guided Access passcode, or a double-click of the side button and Face ID. The steps to use Guided Access on iPhone fit a quick handover, not a standing lock.

Which one to pick

On iOS 18 or later with one sensitive app, use Require Face ID, unless it is one of the eight built-in apps Apple will not let you lock. On iOS 16.4 to 17.x, the Shortcuts passcode lock is the one to build. If you need a password that is not the device passcode, go with the custom password. And for handing the phone over to do a task in one app, Guided Access is the better fit.

On iOS 18, the Shortcuts lock is the weaker choice in nearly every case.

How to Turn Off or Delete the Lock Automation

To pause the lock, open Automation in the Shortcuts app, tap the automation and switch off Enable This Automation. To remove it, swipe left on it and tap Delete. Those are the iOS 26 and earlier steps. On iOS 27, where automations live inside shortcuts, use the trigger’s Automation switch to turn it off, or delete the shortcut.

Apple says a disabled automation will not notify you or run automatically. Its guide also suggests swiping all the way to the left to delete quickly.

Disabling makes sense if you want the lock back later. If the app list changes enough that rebuilding is faster than editing, delete it instead.

Undoing the Home Screen launcher

Delete the launcher shortcut from the Home Screen first. Then bring the real app back.

Drag the app from the App Library to the left edge of the screen and it drops onto the last Home Screen. An Apple Support Community reply gives another route, which is to touch and hold the app in the App Library and choose Add to Home Screen.

Repeat the removal on every iPhone where you built the lock. On iOS 26 and earlier each device holds its own copy, while on iOS 27 automations sync and a synced copy arrives switched off.

Common Questions About the Shortcuts App Lock Automation

Can each app have its own password?

Yes. Build one automation per app, each with its own Ask for Input prompt and its own value in the If action.

Apps grouped inside a single App trigger share one password.

Does the passcode lock work on an iPhone with Touch ID?

Yes. The Lock Screen action sends the phone back to its normal unlock screen, so Touch ID, Face ID or the device passcode all open it.

Will the lock still fire when an app opens from a notification or the App Library?

Yes. Apple describes the App trigger as running actions when an app opens, so it follows the app, not the icon you tapped.

Tapping a notification counts the same as any other launch.

How do I change the password later?

Open the Automation tab and tap the automation to edit it (on iOS 27, open the shortcut that holds the automation). Replace the value in the If action with the new password, then tap Done.

Does the lock work on iPad?

Yes. Apple’s personal automation guide covers both iPhone and iPad, and iPadOS 16.4 shipped alongside iOS 16.4 with the new Shortcuts actions, so the same steps apply.

What Protects Apps Once the Shortcuts Lock Fails?

Once the Shortcuts lock is bypassed, the device passcode does the protecting, along with the iOS 18 app lock and whatever sign-in the app has of its own. The automation guards one moment, the app opening, and nothing after it.

For banking, health and messaging apps, I’d turn on Require Face ID first (iOS 18), then set a strong device passcode, and add the app’s own sign-in lock on top.

The trade-off sits with the native lock. Apple says a locked app opens with Face ID, Touch ID or the passcode, so a watched passcode opens every locked app.

As of November 2026, Apple’s app lock offers no separate password, which is the one job a custom password in Shortcuts still does better.

For any app holding money or medical records, the options for setting a password on apps in iPhone are the natural next step.

Bogdan Sandu

Stay sharp. Ship better code.

Every week: one curated article, one tool worth knowing, one tip you can use tomorrow. No noise, no padding.