You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Lock Screen/ App Feature Automation

So I downloaded an app that allows me to have a video that plays while my phone charges. It’s like looking at your Lock Screen but not really being your Lock Screen. I have it set up to where when I plug my charger in it automatically switches to the app which will automatically start playing the video while the phone charges. The issue I’m facing is I got the app to automatically start when my charger gets connected, but when I unplug my charger I want it to go back to my Lock Screen. I used “If battery is connected to charger play (app)” that works fine but then I have “Otherwise Lock The Screen” however this isn’t working. What am I doing wrong? Is it even possible to get the screen to lock when I unplug the charger without having to manually lock it? P.S. I don’t have a passcode or Face ID set up to get into the phone because I’m not able to get the app working if I do without first unlocking my phone, if there is a way around that let me know. Thanks.

iPhone 14

Posted on Aug 14, 2023 4:58 AM

Reply
Question marked as Top-ranking reply

Posted on Aug 14, 2023 8:35 AM

Hello Million dollar man,


You'll need to create two personal automations. The first one, when the charger is connected, to open the app. The second one, when the charger is disconnected, to lock the screen.

5 replies

Aug 14, 2023 11:50 AM in response to Million dollar man

I’m afraid there is no solution for case #3. The Shortcuts app does not offer a way to detect whether you are using your iPhone or not, or whether the video app is running. See if this video app has some settings that would turn it off automatically, in which case you won’t need any of those automations.


For the following instructions, I’ll assume you know how to create personal automations. If not: Intro to personal automation in Shortcuts on iPhone or iPad - Apple Support.


For case #1, here is what you need :



Add the “Open App” action:



Tap the “App” field and select the video app. Tap next and deactivate “Ask before running “, then tap Done :



For case #2, create a new personal automation (this time for when the charger is disconnected):



Tap “Next” and add the action “Lock Screen”. Tap next and deactivate “Ask before running “, then tap Done.

Aug 14, 2023 11:01 AM in response to 6x6

In addition how do I set up the scripts so when I disconnect the charger while I’m in the Home Screen or in an app it doesn’t automatically lock?


This is how I want it:


Phone plugged in-> Plays the automation for the app to play the video


Phone unplugged (Not Using)-> Lock Screen


Phone unplugged (Using Home Screen or app)-> Doesn’t go to Lock Screen.


A simple step by step of instructions for how to do this would be greatly appreciated. Thanks in advance!

Lock Screen/ App Feature Automation

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.