Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MacRumors

macrumors bot
Original poster
Apr 12, 2001
64,090
31,741


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.jpg

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.
    lock-iphone-when-app-opened4.jpg

    Scroll down and tap App.
  4. Make sure Is Opened is ticked on the next screen, then tap Choose.
    lock-iphone-when-app-opened3.jpg

    Select an app from the list, then tap Done.
  5. Tap Next, then tap the blue Add Action button on the next screen.
    lock-iphone-when-app-opened2.jpg

    Start typing "Lock Screen" into the text field and select Lock Screen when it appears in the results below, then tap Next.
  6. Toggle off the switch next to Ask Before Running.
    Tap Don't Ask in the pop-up prompt, then tap Done.
    lock-iphone-when-app-opened1.jpg
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.

Article Link: How to Lock Specific iPhone Apps Behind Face ID or Your Passcode
 
Last edited:

klasma

macrumors 603
Jun 8, 2017
6,232
17,467
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.
 

klasma

macrumors 603
Jun 8, 2017
6,232
17,467
If only you could set this to be a different passcode then the one used to unlock your phone.
In principle you should be able to set up an automation that asks the user for a specific input. Haven’t tried this though, and the input would be a plain-text input, not a password input.
 
  • Like
Reactions: centauratlas

Newbie67

macrumors regular
Apr 9, 2015
183
125
Still doesn’t protect access to your passwords on keychain. Even with a workaround of setting up secondary password using screen time to protect making changes to a stolen phone a thief can still get all your passwords from keychain. Apple has serious work to do in this area.
 

Robort

macrumors newbie
Oct 1, 2006
15
21
Another limitation is that this automation has no apparent affect on Watch instances of the same app.
 
  • Like
Reactions: klasma

mongobongo

macrumors 6502
May 1, 2007
321
500
Stockholm, Sweden
Still doesn’t protect access to your passwords on keychain. Even with a workaround of setting up secondary password using screen time to protect making changes to a stolen phone a thief can still get all your passwords from keychain. Apple has serious work to do in this area.
This should be preventable by setting this up for the Settings app which is used to access passwords and keychain on iOS. If a thief has your passcode that's a whole other story though.
 

cyanite

macrumors 6502
Sep 28, 2015
339
434
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?
It’s unrelated to that. If people have access to the device passcode, they can control the device, yes.

Still doesn’t protect access to your passwords on keychain. Even with a workaround of setting up secondary password using screen time to protect making changes to a stolen phone a thief can still get all your passwords from keychain. Apple has serious work to do in this area.
It’s unrelated to that. But this trick can’t protect the Shortcuts app itself, so it’s not really much of a protection.
 

Alex Cai

macrumors 6502
Jun 21, 2021
415
369
I found an app named “Cloak” that hides the sensitive apps (gone from the App Library) and it is highly protective
 
  • Like
Reactions: iGeneo

Freida

Suspended
Oct 22, 2010
4,077
5,870
I wanted to try this but I don't have the 'lock screen' option when i type 'lock'. I just get everything else but the screen :(
 

marvin_h

macrumors regular
Aug 6, 2015
135
97
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?

If only you could set this to be a different passcode then the one used to unlock your phone.

As described in much detail in this hot thread, this would not be of much help if someone obtains our passcode:


Still doesn’t protect access to your passwords on keychain. Even with a workaround of setting up secondary password using screen time to protect making changes to a stolen phone a thief can still get all your passwords from keychain. Apple has serious work to do in this area.
Yeah just about the only app that gets this right is 1Password. It allows biometric locking of itself and most importantly if someone adds a new fingerprint or face to the OS, 1Password locks out biometric authentication until the separate 1Password password is used. This prevents someone who has your passcode from adding their biometrics to the phone and accessing 1Password. (Shockingly, many financial institutions don’t take this step!)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.