Is there a way to detect front camera location on the newest iPad Pro's and Air's?

With the newest iPad Pro and iPad Air's, the front facing camera sits on the long horizontal edge, which is different from the previous version which had the camera on the shorter top edge. We have an app that needs to put a UI item near the camera. Is there a way of detecting where the front facing camera is on iOS?

I have tried doing simple resolution checks, i.e,

if width == ipadProWidth || width == ipadAirWidth {
   do2024iPadProLayout()
} else {
   doStandardiPadLayout()
}

But this doesn't feel like the nicest way to do this check, because it's liable to break moving forward, and theres the possibility Apple release more devices with the camera on the horizontal edge.

Any help here is appreciated!

I don't believe there is an API to get this directly.

You need to get the model, i.e. the "iPad13,2" string, and look that up in a table.

Get the model by calling uname() and looking in the machine field of the result.

Is there a way to detect front camera location on the newest iPad Pro's and Air's?
 
 
Q