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
35 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
35 months ago
Hopefully Apple will add this as a simple app toggle in Settings at some point.
Score: 29 Votes (Like | Disagree)
klasma Avatar
35 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
35 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)
ignatius345 Avatar
35 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)
smythey Avatar
35 months ago
Must get my head around shortcuts sometime.....
Score: 15 Votes (Like | Disagree)

Popular Stories

samsung crease less foldable display ces 2026%402x

Foldable iPhone's Crease-Free Display Tech Spotted at CES 2026

Tuesday January 6, 2026 3:04 am PST by
CES 2026 has just provided a first glimpse of the folding display technology that Apple is expected to use in its upcoming foldable iPhone. At the event, Samsung Display briefly showcased its new crease-less foldable OLED panel beside a Galaxy Z Fold 7, and according to SamMobile, which saw the test booth before it was abruptly removed, the new panel "has no crease at all" in comparison. The ...
iPhone Top Left Hole Punch Face ID Feature Purple

10 Reasons to Wait for This Year's iPhone 18 Pro

Thursday January 8, 2026 2:56 am PST by
Apple's iPhone development roadmap runs several years into the future and the company is continually working with suppliers on several successive iPhone models at the same time, which is why we often get rumored features months ahead of launch. The iPhone 18 series is no different, and we already have a good idea of what to expect for the iPhone 18 Pro and iPhone 18 Pro Max. One thing worth...
Apple Card iPhone 16 Pro Feature

Apple Card Will Move From Goldman Sachs to JPMorgan Chase

Wednesday January 7, 2026 12:57 pm PST by
JPMorgan Chase has reached a deal to take over operation of the Apple Card, reports The Wall Street Journal. Barring any "last minute hiccups," the deal should be announced shortly after over a year of negotiations. Reports began circulating over two years ago that current Apple Card issuer Goldman Sachs was looking to end its partnership with Apple as part of an effort to scale back on...
iOS 27 Mock Quick

Five New iPhone Features Rumored for iOS 27

Wednesday January 7, 2026 2:51 pm PST by
Though it's been just a few months since iOS 26 launched, we're already hearing rumors about the next-generation version of iOS, iOS 27. iOS 27 will be introduced at Apple's June WWDC 2026 event before it launches in September 2026. We don't know all of the details about iOS 27 yet, but we do have some information about what to expect. "Snow Leopard" Update iOS 27 will apparently focus...
Logitech MX Master 3S

Logitech Blames 'Inexcusable Mistake' After Certificate Expiry Breaks macOS Apps

Wednesday January 7, 2026 5:27 am PST by
Logitech users on macOS found themselves locked out of their mouse customizations yesterday after the company let a security certificate expire, breaking both its Logi Options+ and G HUB configuration apps. Logitech devices like its MX Master series mice and MX Keys keyboards stopped working properly as a result of the oversight, with users unable to access their custom scrolling setup,...
ChatGPT Health Integration Connectors Feature

OpenAI Launches ChatGPT Health With Apple Health Integration

Wednesday January 7, 2026 11:27 am PST by
OpenAI today announced the launch of ChatGPT Health, a dedicated section of ChatGPT where users can ask health-related questions completely separated from their main ChatGPT experience. For more personalized responses, users can connect various health data services such as Apple Health, Function, MyFitnessPal, Weight Watchers, AllTrails, Instacart, and Peloton. Last month, MacRumors discovere...
iphone 17 models

No iPhone 18 Launch This Year, Reports Suggest

Thursday January 1, 2026 8:43 am PST by
Apple is not expected to release a standard iPhone 18 model this year, according to a growing number of reports that suggest the company is planning a significant change to its long-standing annual iPhone launch cycle. Despite the immense success of the iPhone 17 in 2025, the iPhone 18 is not expected to arrive until the spring of 2027, leaving the iPhone 17 in the lineup as the latest...
AirPods Pro 3 Year of the Horse Feature

Apple Launches Year of the Horse AirPods Pro 3 for Lunar New Year

Monday January 5, 2026 11:28 am PST by
Apple has designed a limited edition version of the AirPods Pro 3 to celebrate Lunar New Year, and customers in select countries can purchase them starting today. The Year of the Horse Special Edition AirPods Pro 3 feature a unique horse emoji character that's otherwise unavailable. Customers in China, Hong Kong, Taiwan, Malaysia, and Singapore are able to buy the AirPods, and they'll be...