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

Popular Stories

General Black Friday Deals 24 Green Tinsel

Apple Black Friday Deals Available Now: AirPods, iPads, and More

Friday November 22, 2024 5:28 am PST by
Black Friday 2024 is less than one week away, and as always the next few days will be the best time of the year to shop for great deals. Right now, this includes big savings on popular Apple products like AirPods, Apple Watch, MacBook Air, iPad, and more. Note: MacRumors is an affiliate partner with some of these vendors. When you click a link and make a purchase, we may receive a small...
anker new xmas 1

Anker Kicks Off Massive Black Friday Sale With Up to 50% Off Sitewide, Free Gifts With Purchase, Mystery Boxes, and More

Thursday November 21, 2024 7:53 am PST by
Anker today kicked off its big Black Friday sale, which is set to run through December 9. This sale includes notable discounts on portable chargers, USB-C hubs, cables, and more. Note: MacRumors is an affiliate partner with Anker. When you click a link and make a purchase, we may receive a small payment, which helps us keep the site running. There are a few bonus offers during this event as ...
iPhone SE 4 Thumb 1

iPhone SE 4 With Apple's Own 5G Modem 'Confirmed' to Launch in March

Tuesday November 19, 2024 12:12 pm PST by
Barclays analyst Tom O'Malley and his colleagues recently traveled to Asia to meet with various electronics manufacturers and suppliers. In a research note this week, outlining key takeaways from the trip, the analysts said they have "confirmed" that a fourth-generation iPhone SE with an Apple-designed 5G modem is slated to launch towards the end of the first quarter next year. In line with previo...
Apple 2024 Black Friday Shopping Event feature

Apple Announces 2024 Black Friday Event, Offering Up to $200 Gift Card

Thursday November 21, 2024 5:10 am PST by
Apple's annual four-day Black Friday through Cyber Monday shopping event is returning on Friday, November 29 through Monday, December 2 in many countries, including the U.S., Canada, Australia, France, Germany, Italy, Spain, the U.K., and others. During the event, customers can get an Apple gift card with the purchase of an eligible product. In the U.S., for instance, Apple is including gift ...
silo tv show apple tv plus

Apple TV+ Releasing Next Week's 'Silo' Episode Early

Friday November 22, 2024 7:25 am PST by
The next episode of Apple TV+'s award-winning sci-fi series "Silo" will be released early. Apple previously announced that new "Silo" episodes would be released on Fridays, but the third episode of the second season will instead be released on Wednesday, November 27. Apple has likely bumped up the date so that people can watch the episode during the U.S. Thanksgiving holiday on Thursday,...
ipads early bf deals

7 Best Black Friday iPad Deals for 2024

Saturday November 23, 2024 1:44 pm PST by
We're less than one week away from Black Friday on November 29, and Best Buy and Amazon currently have all-time low prices across Apple's entire iPad lineup. This includes Apple's 9th and 10th generation iPad, iPad mini 7, iPad Air, and iPad Pro. Note: MacRumors is an affiliate partner with some of these vendors. When you click a link and make a purchase, we may receive a small payment, which...
at t turbo indicator iphone 16 pro max v0 8hrh7w5f3w1e1

AT&T Turbo Indicator Showing Up in iPhone Status Bar for Subscribers

Wednesday November 20, 2024 3:42 am PST by
AT&T has begun displaying "Turbo" in the iPhone carrier label for customers subscribed to its premium network prioritization service, according to reports on Reddit. The new indicator seems to have started appearing after users updated to iOS 18.1.1, but that could be just coincidence. Image credit: Reddit user No_Highlight7476 The Turbo feature provides enhanced network performance through ...
Generic iOS 19 Feature Mock

iOS 19's First New Feature Has Leaked

Friday November 22, 2024 6:22 am PST by
iOS 19 is not expected to be announced until June 2025, but the software update's first major new feature has already leaked. Bloomberg's Mark Gurman this week reported that iOS 19 will introduce a "more conversational Siri" powered by "more advanced large language models." He said this upgrade will make Siri more like OpenAI's ChatGPT, allowing the assistant to "handle more sophisticated...