How to get true orientation when iOS device uses rotation lock?

Using AV Foundation to take photos, and I have the age old issue now of users locking rotation in portrait, turning the device, and taking a landscape photo.

StackOverflow is filled with suggestions on using the accelerometer etc to monitor device changes. Wow - that's a lot of work.

Isn't there anything in iOS 13 or 14 that will return the actual device orientation? Something like:

Code Block
UIDevice.current.actualOrientation


Sure would be nice! Not hopeful for an answer, but hey maybe something changed in the last few years.

David
How to get true orientation when iOS device uses rotation lock?
 
 
Q