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
8 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
8 months ago
Hopefully Apple will add this as a simple app toggle in Settings at some point.
Score: 29 Votes (Like | Disagree)
klasma Avatar
8 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
8 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
8 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
8 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 17

iOS 17.2 Will Add These 12 New Features to Your iPhone

Friday December 1, 2023 12:19 pm PST by
iOS 17.2 has been in beta testing for over a month, and it should be released to all users in a few more weeks. The software update includes many new features and changes for iPhones, including the dozen that we have highlighted below. iOS 17.2 is expected to be released to the public in mid-December. To learn about even more features coming in the update, check out our full list. Journal ...
anker new xmas 1

Anker's Cyber Week Sale Enters Final Days With Up to 60% Off Sitewide

Friday December 1, 2023 12:05 pm PST by
Anker's Black Friday/Cyber Week event is entering its final days this weekend, and it's still offering up to 60 percent off sitewide. There are also a few "mystery boxes" that can include hundreds of dollars in savings, if you're willing to risk not knowing what you're buying ahead of time. All of these sales will end on December 3. Note: MacRumors is an affiliate partner with Anker. When you...
General Apps Messages

Green Bubbles on iPhone to Gain These 7 New Features Next Year

Thursday November 30, 2023 9:00 am PST by
Earlier this month, Apple announced that it will finally support RCS in the Messages app on the iPhone starting later next year. This change will result in several improvements to the messaging experience between iPhones and Android devices. RCS will become the new default standard for messaging between iPhones and Android devices, but these conversations will still have green bubbles like...
top stories 2dec2023

Top Stories: iOS 17.1.2 Released, NameDrop Misinformation, and More

Saturday December 2, 2023 6:00 am PST by
Apple employees are back to work following a Thanksgiving break, and that means this week saw a number of new operating system updates for both public release and beta testing. This week also saw some misinformation about Apple's new NameDrop feature making the rounds, while Apple and Goldman Sachs appear to be on the verge of a break-up in their Apple Card and savings account partnership,...
instagram messenger

Instagram and Facebook Messenger Chats to Disconnect This Month

Tuesday December 5, 2023 1:57 am PST by
Meta has revealed plans to end Instagram users' ability to chat with Facebook accounts later this month, rolling back a feature that it introduced over three years ago. In September 2020, Meta (then Facebook) announced it was merging its Facebook Messenger service with Instagram direct messaging, allowing Instagram users to chat with Facebook users and vice versa using the same platform....
iphone 5g mmwave

Apple's Work on 6G Connectivity Already Expanding

Monday December 4, 2023 7:00 am PST by
Apple's work on implementing 6G cellular connectivity on its devices appears to be ramping up, according to Bloomberg's Mark Gurman. In the latest edition of his "Power On" newsletter, Gurman explained that Apple is increasingly turning its attention to 6G, even amid its widely reported difficulties developing a custom 5G cellular modem. In 2021, the first highly specific Apple job...