Apple doesn’t offer Smart Orientation Unlock, which could lock iPhone in portrait mode except for videos. While waiting for this function to arrive one day, iOS 14.5 will provide a solution thanks to the Shortcuts app. This update, currently in beta, indeed includes a new action that automates the activation and deactivation of the lock. You can’t do it for a video, but when you open an app, which can do the trick.
In this example, I’ve configured the Shortcuts app to turn off Orientation Lock when I open YouTube and turn it on again when I close YouTube. By default the lock is on, as I show at the start of the video. Thanks to the automation, it is indeed deactivated in YouTube, which would allow me to switch the iPhone to landscape mode, and it is indeed reactivated at the end, after leaving the app.
You must therefore create two personal automations, one to disable orientation lock when opening apps, the other to activate when these apps are closed. If you have never used this function, a little reminder on the method to follow. Everything is done in the “Automations” tab of the Shortcuts app.
You will need to create a “personal” automation, choose the “App” trigger and select one or more apps. Select “Is open” for one automation and “Is closed” for the other, then add the action Set orientation lock. each time, by changing the “Toggle” setting to turn off the lock when opening apps, and back on when they close.
For seamless automation, remember to uncheck the “Ask before running” option at the end. Therefore, you can leave the orientation lock activated on a daily basis and these two automations will take care of deactivating it only when using certain apps. In use, this works perfectly, even if you have to deal with the multiple notifications sent by the Shortcuts app and which are mandatory.
– .