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

iOS 18 Apple Music Messages and Notes Feature 1

iOS 18 Rumored to Add New Features to These 16 Apps on Your iPhone

Tuesday April 30, 2024 10:44 am PDT by
Apple is expected to announce iOS 18 during its WWDC keynote on June 10, and new features have already been rumored for many apps, including Apple Music, Apple Maps, Calculator, Messages, Notes, Safari, and others. Below, we recap iOS 18 rumors on a per-app basis, based on reports from MacRumors, Bloomberg's Mark Gurman, and others: Apple Maps: At least two new Apple Maps features are...
apple watch ipad demo 1

Check Out This Apple Watch iPad Demo Unit From 2014

Wednesday May 1, 2024 1:46 pm PDT by
With the 10th anniversary of the Apple Watch approaching, we thought it would be fun to take a look back at an interesting bit of Apple Watch history. After the Apple Watch was announced in 2014, and before it became available in 2015, Apple sent out custom Apple Watch iPad demo kiosks to retail stores. The Apple Watch and iPad units used for these devices were specially designed, had custom ...
maxresdefault

Will the New iPad Pro Really Have the M4 Chip?

Wednesday May 1, 2024 8:30 am PDT by
While Apple's upcoming iPad Pro models have been expected to feature the M3 chip for over a year, recent reports have unexpectedly suggested that the new devices will instead feature the as-yet-unannounced M4 chip. Subscribe to the MacRumors YouTube channel for more videos. Last week, Bloomberg's Mark Gurman said that he now believes there is a "strong possibility" that the upcoming iPad Pro ...
ios 17 5 repair state

iOS 17.5 Includes 'Repair State' Option That Doesn't Require Turning Off Find My for Service

Tuesday April 30, 2024 1:24 pm PDT by
With iOS 17.5, Apple is adding a "Repair State" feature that is designed to allow an iPhone to be sent in for service without deactivating Find My and Activation Lock. The fourth iOS 17.5 beta that came out today adds a "Remove This Device" option for all devices in Find My, and using it with an iPhone puts that iPhone into the new Repair State. Right now, sending an iPhone to Apple to be...
Apple CarPlay Dash

Report Examines GM's Controversial Move to Abandon Apple CarPlay

Wednesday May 1, 2024 4:53 am PDT by
An in-depth Bloomberg report today resurfaced General Motors' decision to replace Apple CarPlay with its own software. Last year, GM announced that it planned to forgo Apple CarPlay in its new electric vehicles, starting with the 2024 Chevrolet Blazer EV. Instead, the automaker introduced a proprietary infotainment platform, aiming to control and customize the digital experience within its...
Airpods Pro 2 Discount Feature Triad

Amazon's New Apple Sale Has Best-Ever Prices on AirPods Pro, Studio Display, Apple Pencil, and More

Tuesday April 30, 2024 7:31 am PDT by
Amazon today kicked off numerous discounts across multiple Apple products and accessories, the highlight being the AirPods Pro 2 with USB-C for $179.99, down from $249.00. You'll also find deals on the Apple Pencil 2, AirTags, and Studio Display. Note: MacRumors is an affiliate partner with Amazon. When you click a link and make a purchase, we may receive a small payment, which helps us keep...
maxresdefault

Apple Announces 'Let Loose' Event on May 7 Amid Rumors of New iPads

Tuesday April 23, 2024 7:11 am PDT by
Apple has announced it will be holding a special event on Tuesday, May 7 at 7 a.m. Pacific Time (10 a.m. Eastern Time), with a live stream to be available on Apple.com and on YouTube as usual. The event invitation has a tagline of "Let Loose" and shows an artistic render of an Apple Pencil, suggesting that iPads will be a focus of the event. Subscribe to the MacRumors YouTube channel for more ...