Lock iPhone / iPad when opening or closing certain apps (from iOS 16.4)

If you give children the iPad to play or watch videos, if you show photos on the mobile device to acquaintances or if someone grabs the iPhone on the street, then you can protect apps and content with certain security mechanisms. For example, if the iPad should be locked when the game is closed so that the child cannot access social media, the settings or the camera, this can be done with a shortcut or automation. If the acquaintances should only see the photos and nothing else on the iPhone, this is also possible. Also, opening certain Apps bring up the lock screen. You can find out how this works here.

You can have the lock screen of iPhone and iPad appear when a certain app is closed or opened. In this way, use can be limited to one app or apps can be excluded.
You can have the lock screen of iPhone and iPad appear when a certain app is closed or opened. In this way, use can be limited to one app or apps can be excluded.

Lock screen shortcut with open or close an app as a trigger

So if you want to protect certain apps from prying eyes or limit others to one app, you can do it all with the Shortcuts app. There you create a new automation and set the opening or closing of an app as the trigger. 

Then you select as a follow-up action to call up the lock screen (available from iOS 16.4 and iPadOS 16.4). There your passcode, your Touch ID or your Face ID will be requested so that only you can authorize use. If you don't know exactly how it all works, you can find the individual instructions below.

Bring up the iPad or iPhone lock screen when closing an app

Let's first consider the case where you want to lock the Apple device when an app is exited. So if the kid closes Angry Birds to read your messages or play around with the settings, they won't get very far. And that is how it works:

  1. Open the Shortcuts app and tap the middle dot below Automation an
  2. Either tap the blue “Create Custom Automation” button or the in the top right Plus symbol (+) if there are already automations
  3. Scroll down the Triggers panel and select App from
  4. Selects the app (or multiple apps) to act as a trigger via Select from
  5. Uncheck "opening" and check "closing"
  6. Tap in the top right Continue
  7. Tap on Add action and enter "lock" in the search field - then type the first suggestion lock screen an
  8. Choose again at the top right Continue from
  9. Deactivates the slider for "Confirm before executing" and confirms this in the popup with "Do not confirm"
  10. Includes the whole thing Ready top right

If you only want to allow the use of the Sir Apfelot app and lock the iPhone when the app is wiped away / exited, then the shortcut looks like this:

Bring up the iPad or iPhone lock screen when opening an app

If you give someone else your iPhone or iPad, but want to protect individual apps from prying eyes, then this is also possible. The way to get there is even very similar to the one shown above. To set the lock screen to show automatically when a specific app (or one of several selected apps) is opened:

  1. Open the Shortcuts app and tap the middle dot below Automation an
  2. Either tap the blue “Create Custom Automation” button or the in the top right Plus symbol (+) if there are already automations
  3. Scroll down the Triggers panel and select App from
  4. Selects the app (or multiple apps) to act as a trigger via Select from
  5. Leave the checkmark next to "opening" and ignoring "closing"
  6. Tap in the top right Continue
  7. Tap on Add action and enter "lock" in the search field - then type the first suggestion lock screen an
  8. Choose again at the top right Continue from
  9. Deactivates the slider for "Confirm before executing" and confirms this in the popup with "Do not confirm"
  10. Includes the whole thing Ready top right

If the iPhone is allowed to be used more extensively, but the photos are to be locked away, the shortcut will look like this:

Security Limits: Shortcut Response Time and Known Codes

The two shortcuts are just a workaround. I can imagine that Apple will implement real app protection in iOS and iPadOS at some point - but until then you have to make do with this. 

It is important to know that the shortcuts sometimes take a few seconds to react. So if I close the Sir Apfelot app with the settings shown above and trigger the lock screen, I still have a few moments in between to open another app and at least get a quick look at it. While that wouldn't be enough for someone else to message or change device settings on my behalf, this clearly isn't an instant lockdown.

In addition, the measures described will of course not work if the person holding your iPhone or iPad knows your passcode. Because then the device can be easily unlocked again and everything can be used without restrictions. 

Did you like the article and did the instructions on the blog help you? Then I would be happy if you the blog via a Steady Membership would support.

5 comments on “Lock iPhone / iPad when opening or closing certain apps (from iOS 16.4)”

    1. Jen Kleinholz

      I think in Guided Access you can't close the app that is currently open. You MUST stay in this app.

    2. Johannes Domke

      Hello iron,

      depending on which procedure you are used to, either the shortcut or appears the guided access more complicated. Personally, I would rather choose the shortcut - as you can see from the screenshots, it only took a minute to set it up. However, once guided access has been set up, it can certainly be used quickly for any app. We now have guidance for both options, but we don't dictate who should use what for what purpose.

      Guided access also has a disadvantage for some application areas (at least as far as I understand it): it can only be applied to one app. Multiple apps can also be selected in the shortcut shown above. So you can lock multiple apps instead of unlocking just one. This can e.g. B. be useful when you ask someone for help with app problems and that person needs to have access to the app, settings and the like. But if you want to keep your hands off mail, photos and messengers, you can lock them with the shortcut.

      As you can see, it always depends on the individual use. Depending on the application, one approach may be more appropriate and the other more complicated.

      Best regards
      John

        1. Johannes Domke

          Hello iron,

          also here: there are different ways. And you can decide for yourself which solution is best for you. If you z. For example, if you don't know anything about Screen Time and Guided Access, but you already know a bit about shortcuts, you can help yourself here. If it looks different, then you can choose a different approach.

          For whom which procedure is “convenient” is subjective. I'm just trying to offer possible solutions here. Which workflow you create from it is a matter of application and taste.

          Best regards
          John

Post a comment

Your e-mail address will not be published. Required fields are marked with * marked

In the Sir Apfelot Blog you will find advice, instructions and reviews on Apple products such as the iPhone, iPad, Apple Watch, AirPods, iMac, Mac Pro, Mac Mini and Mac Studio.