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 new to iOS 16.4.

Apple has added several new 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 on your iPhone.
  2. Tap the Automation tab at the bottom of the screen.
  3. Tap the + button in the top-right corner, then tap Create Personal Automation.
    shortcuts

  4. Scroll down and tap App.
  5. Make sure Is Opened is ticked on the next screen, then tap Choose.
    shortcuts

  6. Select an app from the list, then tap Done.
  7. Tap Next, then tap the blue Add Action button on the next screen.
    shortcuts

  8. Start typing "Lock Screen" into the text field and select Lock Screen when it appears in the results below, then tap Next.
  9. Toggle off the switch next to Ask Before Running.
  10. Tap Don't Ask in the pop-up prompt, then tap Done.settings

Your personal automation is now complete and should automatically spring into action the next time you open the chosen app. Note that the same Lock Screen action can also be found in macOS 13.3, but bear in mind that there may be other ways to access the contents of a Mac app without launching it.

Top Rated Comments

multipasser Avatar
6 weeks ago
oh waw!!!! so easy and userfriendly.

Ffs.. without a how-to not a single user will ever figure this out.
Score: 28 Votes (Like | Disagree)
klasma Avatar
6 weeks ago
Hopefully Apple will add this as a simple app toggle in Settings at some point.
Score: 28 Votes (Like | Disagree)
klasma Avatar
6 weeks 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
6 weeks 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: 17 Votes (Like | Disagree)
MacProFCP Avatar
6 weeks 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
6 weeks 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

gmailbeforeandafter

Gmail, Google Docs and Google Sheets Gain Support for 2018 iPad Pro Models

Monday February 4, 2019 1:51 pm PST by
Google today updated its Gmail, Google Docs, and Google Sheets apps for iOS devices, introducing support for the new 11 and 12.9-inch iPad Pro models. The update brings an optimized form factor that no longer features distracting black bars at the top and bottom of the display in portrait mode or at the sides in landscape mode. Following the update, the Gmail app takes up the entirety of the...
macos monterey

Here Are All the Macs Compatible With macOS Monterey

Monday June 7, 2021 12:17 pm PDT by
macOS Monterey is compatible with many of the Macs that were able to run macOS Big Sur, but it drops support for some older MacBook Air and iMac models from 2013 and 2014. A full compatibility list is below: iMac - Late 2015 and later iMac Pro - 2017 and later MacBook Air - Early 2015 and later MacBook Pro - Early 2015 and later Mac Pro - Late 2013 and later Mac mini -...