From The Blog: iOS 11 update: icons and safe area APIs

Perhaps. Have you ran the code on Windows? From your answer it seems you are running the test on Mac.

Anyway, I’ll sum it up:

Corona Pro version

PC OS: Windows

Corona Simulator Skin: IPhoneX

Build: 3157

Code: local topInset, leftInset, bottomInset, rightInset = display.getSafeAreaInsets()

Result: topInset, leftInset, bottomInset, rightInset are all zeroes. 

Expected: topInset, leftInset, bottomInset, rightInset should not be zeroes.

What about the icon problem described above (empty icon when building to the device, but icon is visible when installing using TestFlight or Promo Code)?

@Aatos Media, I can’t reproduce this. iOS 11 requires you use a different way to deliver icons, but it appears you are doing so correctly. iOS likes to cache icons longer than they should. Have you tried on other devices?

@rune7 I saw that today’s daily build (3160) has a fix for the iPhone X skin on Windows?

Rob

I deleted the old installation, restarted the device and installed the app. The icon was there now.

I’ve just been adding support for this, and launched the game on my iPhone 7 plus. I noticed that the safe area doesn’t include the very top of the screen (I’m testing in landscape). In the simulator, it’s the whole screen.

Do you know if this is desired behaviour, or is something wrong?

Thanks,

The iPhone X in landscape mode lets you get the full height of the screen, but there is a swipe up area at the bottom that should result in the bottom offset showing something different than display.actualContentHeight

Rob

Hi Rob, I’m specifically talking about iPhone 7plus. I don’t have an iPhone X to play with yet :slight_smile:

What values are you gettings?

What are the settings for your status bar?

Rob

“UIStatusBarHidden” was actually set to false, but I’ve set it to true and still seeing the issue.

This is what I’m using:

local topInset, leftInset, bottomInset, rightInset = display.getSafeAreaInsets()

print(topInset, leftInset, bottomInset, rightInset);

output:

15.461956977844, 0, 0, 0,

Also, I have this:

display.setStatusBar(display.HiddenStatusBar);

Rob, I would follow this thread.  Vlad posted some additional information there:

https://forums.coronalabs.com/topic/70435-iphone-x-top-inset-values/

Rob