Copy link to clipboard
Copied
Hi everyone,
I am in the process of updating our apps with support for the latest iPhone generation that all have a Notch. I thought I'd share the deviceModels for everyone else to update your apps:
iPhone X | iPhone10,3 |
iPhone X GSM | iPhone10,6 |
iPhone XS | iPhone11,2 |
iPhone XS | iPhone11,2 |
iPhone XS Max | iPhone11,4 |
iPhone XS Max China | iPhone11,6 |
iPhone XR | iPhone11,8 |
For more details you can have a look at my blog.
Copy link to clipboard
Copied
Very good timing! Thanks for sharing!
Copy link to clipboard
Copied
Thanks, great blog!
Couldn't the notch issue also be handled by checking for aspect ratio, (if larger than 16:9)?
Copy link to clipboard
Copied
Thanks! Yes sure, right now there should not be any issue with that. But in case that Apple will release a device in the future that has no notch but the same aspect ratio or resolution, this approach would no longer work. Same if Apple would release an iPad with a notch that has a different ratio. Also Android manufacturers start to release devices with a notch, so I feel better to base the decision on the deviceModel and not the ratio. But in the end it's a question of taste and as long as you are only looking at iOS, you should be fine to only check the aspect ratio (for now).
Copy link to clipboard
Copied
Good point!
Hopefully, in the future, AIR will hand us the "safe area".
Copy link to clipboard
Copied
Thanks you, useful info!
Copy link to clipboard
Copied
I am happy that several people are finding your article to be useful. But, I wanted to mention the way I solved the same issue, because it has a couple of advantages.
I do things like this (I grabbed the screen height and width previously):
left_arrow.y = screenheight/2;
var screenratio:Number = screenheight / screenwidth;
if(screenratio<(.562)) left_arrow.y = 455;
For my 576 tall stage that pushes the arrow into the lower notch of iPhone X. I probably should have it say screenheight * .79, so that the code would work for other stage sizes, but at least I have the button on an exact pixel.
Anyway, the two advances of this approach are that I don't have to check the phone type, and the same code will work for the recent Android phones that also have notches. For the super wide Android phones that don't have a notch, the button is still put into the corner, but it looks fine, so I'm not going to special case wide phones that don't have notches.