In the interests of enhanced privacy, some third-party iOS apps include an option to require passcode or Face ID authentication before they can be opened, even though the iPhone is already unlocked. This puts the app's contents behind an additional layer of security, but not all apps offer the same facility.

iphone passcode green
Until recently, Apple did not offer a way to individually lock sensitive apps like Photos, and iPhone users had to resort to Screen Time's App Limits as a workaround. Fortunately however that's no longer the case, because you can now create an additional security barrier for any app on your iPhone using a shortcut action that's included in iOS 16.4 and later.

Apple has added several more actions to the Shortcuts app, and the one that interests us here is Lock Screen. The Lock Screen action essentially allows you to set up a personal automation that automatically locks your iPhone when a specified app is opened.

Of course, this action should pose no access issues for you as the iPhone owner, but it does mean that anyone else trying to open the app first needs to pass facial authentication or enter your passcode even though your iPhone was unlocked when they tapped the app icon.

The following steps guide you through the process of setting up a personal automation that will instantly lock your iPhone when the app of your choosing is opened.

  1. Launch the Shortcuts app, tap the Automation tab at the bottom of the screen.
  2. Tap the + button in the top-right corner, then scroll down the menu of options and choose App.
  3. On the next screen, tap Choose to select an app from the list of apps, then tap Done.
  4. Make sure Is Opened and Run Immediately are selected, then tap Next.
    shortcuts

  5. Start typing "Lock Screen" into the text field and select Lock Screen when it appears in the results below.
  6. You should see your new automation "When [app] is opened, Lock screen" added to the Automations list.
    shortcuts

Your personal automation is now complete and should automatically spring into action the next time you open the chosen app.

Top Rated Comments

multipasser Avatar
13 months ago
oh waw!!!! so easy and userfriendly.

Ffs.. without a how-to not a single user will ever figure this out.
Score: 29 Votes (Like | Disagree)
klasma Avatar
13 months ago
Hopefully Apple will add this as a simple app toggle in Settings at some point.
Score: 29 Votes (Like | Disagree)
klasma Avatar
13 months ago
You’d probably also want to do this for the Shortcuts app itself, to prevent someone from disabling the automation.

Edit: And it turns out you can’t do that, see downthread.
Score: 23 Votes (Like | Disagree)
klasma Avatar
13 months ago

This workaround sounds promising -- but doesn't it just use the same spied passcode that thieves used to unlock the phone in the first place?
The use case here is when you give someone your unlocked phone, e.g. to play a game, that they don’t also get access to your sensitive data. Or when you leave your phone unlocked for a minute somewhere by accident.

This will be fun for law enforcement trying to inspect your phone, by the way.
Score: 18 Votes (Like | Disagree)
MacProFCP Avatar
13 months ago
If only you could set this to be a different passcode then the one used to unlock your phone.
Score: 17 Votes (Like | Disagree)
ignatius345 Avatar
13 months ago
This workaround sounds promising -- but doesn't it just use the same spied passcode that thieves used to unlock the phone in the first place?
Score: 16 Votes (Like | Disagree)

Popular Stories

Delta Feature

Delta Game Emulator Now Available From App Store on iPhone

Wednesday April 17, 2024 9:58 am PDT by
Game emulator apps have come and gone since Apple announced App Store support for them on April 5, but now popular game emulator Delta from developer Riley Testut is available for download. Testut is known as the developer behind GBA4iOS, an open-source emulator that was available for a brief time more than a decade ago. GBA4iOS led to Delta, an emulator that has been available outside of...
iPhone 15 Pro Action Button Translate

All iPhone 16 Models to Feature Action Button, But Usefulness Debated

Tuesday April 16, 2024 6:54 am PDT by
Last September, Apple's iPhone 15 Pro models debuted with a new customizable Action button, offering faster access to a handful of functions, as well as the ability to assign Shortcuts. Apple is poised to include the feature on all upcoming iPhone 16 models, so we asked iPhone 15 Pro users what their experience has been with the additional button so far. The Action button replaces the switch ...
Provenance Emulator

PlayStation, GameCube, Wii, and SEGA Emulator for iPhone and Apple TV Coming to App Store

Friday April 19, 2024 8:29 am PDT by
The lead developer of the multi-emulator app Provenance has told iMore that his team is working towards releasing the app on the App Store, but he did not provide a timeframe. Provenance is a frontend for many existing emulators, and it would allow iPhone and Apple TV users to emulate games released for a wide variety of classic game consoles, including the original PlayStation, GameCube, Wii,...
maxresdefault

Hands-On With the New App Store Delta Game Emulator

Wednesday April 17, 2024 12:19 pm PDT by
A decade ago, developer Riley Testut released the GBA4iOS emulator for iOS, and since it was against the rules at the time, Apple put a stop to downloads. Emulators have been a violation of the App Store rules for years, but that changed on April 5 when Apple suddenly reversed course and said that it was allowing retro game emulators on the App Store. Subscribe to the MacRumors YouTube channel ...
iOS NES Emulator Bimmy Feature

NES Emulator for iPhone and iPad Now Available on App Store [Removed]

Tuesday April 16, 2024 11:33 am PDT by
The first approved Nintendo Entertainment System (NES) emulator for the iPhone and iPad was made available on the App Store today following Apple's rule change. The emulator is called Bimmy, and it was developed by Tom Salvo. On the App Store, Bimmy is described as a tool for testing and playing public domain/"homebrew" games created for the NES, but the app allows you to load ROMs for any...