I'm working on a photo capturing application.
My app only supports portrait mode and I have to rotate landscape images to rotate them for the portrait mode. For example I want to rotate the photo 90 degrees right if it was captured in landscapeRight
.
But if user device is in "Lock screen orientation" mode, I can't get the correct device orientation value with UIDevice.current.orientation
if user is trying to take a landscape positioned photo. It always returns "portrait" value of course due to the "lock screen oritentation".
I want to ask permission to user for unlocking screen orientation with like "This application wants to unlock your screen orientation" message. Is it possible to add my info.plist to add a permission request for unlocking screen orientation? And if yes, which permission do I have to add in my info.plist?
Thanks in advance.