• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Notch support for latest iPhone generation

Advocate ,
Oct 16, 2018 Oct 16, 2018

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 XiPhone10,3
iPhone X GSMiPhone10,6
iPhone XSiPhone11,2
iPhone XSiPhone11,2
iPhone XS MaxiPhone11,4
iPhone XS Max ChinaiPhone11,6
iPhone XRiPhone11,8

For more details you can have a look at my blog.

TOPICS
Development

Views

800

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 16, 2018 Oct 16, 2018

Copy link to clipboard

Copied

Very good timing! Thanks for sharing!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Oct 16, 2018 Oct 16, 2018

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)?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Oct 16, 2018 Oct 16, 2018

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).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Oct 17, 2018 Oct 17, 2018

Copy link to clipboard

Copied

Good point!

Hopefully, in the future, AIR will hand us the "safe area".

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Oct 19, 2018 Oct 19, 2018

Copy link to clipboard

Copied

Thanks you, useful info!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 19, 2018 Oct 19, 2018

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines