I'm curious if anyone has discovered a way to determining if their Messages app is in landscape left or landscape right? I've seen this topic come up in other discussions, but have not seen a resolution. Since Messages Extensions do support use of the camera and AVFoundation, I've been unable to set my video orientation as I'd usually use UIDevice.current.orientation to determine the orientation. Messages Extensions consistently report an unknown orientation, rather than Face Up, Face Down, Portrait, Landscape Left, Landscape Right, etc.
I've been able to use a helpful suggestion of someone here to determine portrait vs. landscape by checking the following in my viewDidLayoutSubviews();
if UIScreen.main.bounds.size.width < UIScreen.main.bounds.size.height {
// Portrait
} else {
// Landscape
}
This, however, results in things working well in portrait, but can result in rotated or upside down images in landscape since I cannot set landscape left or landscape right (or portrait upside down on iPad, for that matter).
Thanks!