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
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
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
Ugh. Not looking forward to updating my games to work with this aspect ratio.
Thank you for reacting so fast.
Hi,
I made the changes to our project. The build was reviewed and approved. If I then build the project to my device, the icon is not visible. It shows the empty iOS icon. If I download the same version from the Apple Store, the icon is there?? Has I done something wrong?
That seems rather odd. Just to be sure if you download it from the store you get your icons?
Can you post your build.settings?
Rob
Yes. If I download the app using promo code, the app has icon.
-- -- For more information on build.settings see the Corona SDK Build Guide at: -- http://docs.coronalabs.com/guide/distribution/buildSettings/index.html -- settings = { splashScreen = { enable = false, --image = "ipadproportrait.png" }, orientation = { -- Supported values for orientation: -- portrait, portraitUpsideDown, landscapeLeft, landscapeRight default = "landscapeLeft", supported = { "landscapeLeft", "landscapeRight" }, }, excludeFiles = { -- Include only the necessary icon files on each platform iphone = { "Icon-\*dpi.png", }, android = { "pictures/icons/I\*.png", }, all = { "pictures/background/versio\*", }, }, -- -- iOS Section -- iphone = { xcassets = "Images.xcassets", plist = { ITSAppUsesNonExemptEncryption = false, UIStatusBarHidden = false, UIPrerenderedIcon = true, -- set to false for "shine" overlay UILaunchStoryboardName = "LaunchScreen", --UIApplicationExitsOnSuspend = true, -- uncomment to quit app on suspend --[[-- iOS app URL schemes: CFBundleURLTypes = { { CFBundleURLSchemes = { "fbXXXXXXXXX", -- replace XXXXXXXXX with your Facebook appId } } } --]] } }, -- -- Android Section -- android = { isGame = true, usesPermissions = { "android.permission.INTERNET", "android.permission.ACCESS\_NETWORK\_STATE", "android.permission.WRITE\_EXTERNAL\_STORAGE", "com.android.vending.BILLING", "com.android.vending.CHECK\_LICENSE", }, googlePlayGamesAppId = "xxxxxxxxxx", }, plugins = { ["plugin.bit"] = { publisherId = "com.coronalabs" }, -- ["plugin.unityads"] = -- { -- publisherId = "com.coronalabs", -- supportedPlatforms = { iphone=true, android=true } -- }, ["plugin.applovin"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, android=true } }, ["plugin.gpgs"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } }, ["CoronaProvider.gameNetwork.apple"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true } }, ["plugin.flurry.analytics"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, android=true } }, ["plugin.google.iap.v3"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } }, } }
Hi, is it safe to use the new safe properties across all builds including android? Or should I differentiate in the code?
I’ve tested the simulator on latest build (3156) and for iPhoneX sim the suggested method below return all zeroes
local topInset, leftInset, bottomInset, rightInset = display.getSafeAreaInsets()
we cannot submit to store with this issue.
Android devices now support safe zones with a recent daily build.
Rob
But the build does not return correct numbers on simulator. Its all zeroes. How can I test for iPhoneX?
I apologize. I’ve been out of the office for a little while. This seems to be discussing using the save zone API’s for Android but now it’s talking about the iPhone X simulator (which I’ve not had a chance to even look at yet).
Can you clarify what is/isn’t working as expected? Android should include status bars in it’s safe zone calculations, but these are new API’s and we may have a few hiccup’s to iron out yet. What will help the most is specifics.
Rob
Well, i’m currently concerned with ios, but both scenarios do not work. I wrote above the method returns zero values when testing with iphoneX settings on win simulator
Can you post your code? Both the iOS iPhone X simulator and the Corona Simulator using the iPhone X skin are reporting numbers that are not 0 when they should be not zero and zero when they should.
Rob
On windows?? That would be weird as i simply copied the sample code from the docs and ran it. I know dfrom another developer that on mac the code seems to work. But we develop on windows and only compile on mac before submissions
I feel I’m missing something here. It’s probably a small language issue. Can you clearly state what version of Corona you are using and what platform you are running it on and what skins are returning what are wrong values. Please provide as much detail as you can.
Rob