iPad Pro M4 - camera orientation on lanscape front-facing camera

I've had a photo app in the Store for 10+ years that just started behaving unexpectedly on the newly release iPad Pro M4 (May 2024). This is the first iPad with the camera on the landscape (longer) edge of the iPad.

The camera preview behaves as expected in my app, but the resulting photos are upside-down. How can I determine when I am dealing with the landscape camera? I'd like to avoid casing on a device by device basis.

I have been unable to find any mention of a new API call that would allow me to determine which front-facing camera I'm dealing with. Does something like this exist?

Thanks!

User error! It is the "10+ years" that should have tipped us off. The main issue is that we were using AVCaptureStillImageOutput which has been deprecated and replaced by AVCapturePhotoOutput.

In case anyone is curious why the photos were flipping for us, we had been manually rotating the image based on the orientation of the device to make sure images ended "right-side-up". Given that the landscape camera is oriented differently than the portrait camera, our manual rotations were having ill-effect. Apparently, AVCapturePhotoOutput lets you set the orientation prior to capturing the photo, will do its own figuring of whether it has a portrait or landscape mounted camera, then return a properly oriented image - no manual rotations needed. Hope this helps someone.

iPad Pro M4 - camera orientation on lanscape front-facing camera
 
 
Q