Alert box on iPhone6

Hi everybody,

this week I started to use Corona SDK on ios8, I’m testing my app on iPhone 6.

On android everything has worked good, but now, on the iPhone 6 something needs to be fixed.

The alert box appears correctly (bright white), but after one second maybe less it becomes dark  (as you can see in the attachment).

I know that alert box has caused a lot of issue with the new ios 8.

How can I solve my problem?

Can you be more specific as to the problem?  On iOS when a native.alert box shows, it dims the screen slightly.  I don’t see anything in the screen shot that’s unusual.

Is your issue because it’s graying out or because the dialog box is showing?

Rob

The problem is that the alert box becomes dark, this because the background is dark green. I tried with withe background and the alert box is bright white. I don’t like this situation because the alert box appears bright white and after 0.5 second becames dark. Can I remove the alert box’s slight transparency? 
But now I have another issue with alert box. My app can work only on portrait mode, but when i rotate the device everything stay on portrait mode but the alert box rotate and a part is cutoff as you can see in the attachment 9qAdT1A.png?1

Can you post your config.lua and build.settings?

As far as  the darkening of the screen, that’s the OS showing a native.alert box.  If you are doing a native.showAlert() you’re going to get that effect.  If you don’t want the native behavior, you can always build your own message box.  If you’re using composer, you could use an overlay scene, but a simple display.newContainer() with a display.newText() and a widget.newButton() .

Rob

Thanks Bob for your help, 

This is build.settings

-- Supported values for orientation: -- portrait, portraitUpsideDown, landscapeLeft, landscapeRight settings = { orientation = { default = "portrait", content = "portrait", supported = { "portrait", } }, androidPermissions = { "android.permission.INTERNET", }, iphone = { plist = { UIStatusBarHidden = false, UIPrerenderedIcon = true, -- set to false for "shine" overlay UIInterfaceOrientation = "UIInterfaceOrientationportrait", UISupportedInterfaceOrientations="UIInterfaceOrientationportrait", --UIApplicationExitsOnSuspend = true, -- uncomment to quit app on suspend --[[-- iOS app URL schemes: CFBundleURLTypes = { { CFBundleURLSchemes = { "fbXXXXXXXXXXXXXX", -- example scheme for facebook "coronasdkapp", -- example second scheme } } } --]] } }, --[[-- Android permissions androidPermissions = { "android.permission.INTERNET", },]]-- } iphone = { plist = { UIAppFonts = { "Impact.ttf", "Calibri.ttf", }, UIApplicationExitsOnSuspend = true }, } 

and this is my config.lua

application = { content = { width = 320, height = 480, scale = "letterbox" , fps = 30, }, }

I would suspect this is the problem:

            UIInterfaceOrientation = “UIInterfaceOrientationportrait”,
            UISupportedInterfaceOrientations=“UIInterfaceOrientationportrait”,

I’m pretty sure the “P” in portrait should capitalized.  You however do not have to specify those as that’s what our “orientation” block is supposed to do.

That may take care of the orientation problem.

Rob

  UIInterfaceOrientation = “UIInterfaceOrientationportrait”,
            UISupportedInterfaceOrientations=“UIInterfaceOrientationportrait”,

I tried to write Portrait with capitalized P but it also doesn’t work. I also tried to remove those 2 line of code, the result is the same.  :frowning:

The rotation thing looks like a bug.  But that said, your build.settings does have some issues.  Here is a cleaned up version:

-- Supported values for orientation: -- portrait, portraitUpsideDown, landscapeLeft, landscapeRight settings = {          orientation = {         default = "portrait",         --content = "portrait",         supported = { "portrait", }     },          android = {        androidPermissions = {             "android.permission.INTERNET",         },     },          iphone = {         plist = {             UIStatusBarHidden = false,             UIPrerenderedIcon = true, -- set to false for "shine" overlay             UIInterfaceOrientation = "UIInterfaceOrientationPortrait",             UISupportedInterfaceOrientations="UIInterfaceOrientationPortrait",             UIAppFonts =             {                 "Impact.ttf",                 "Calibri.ttf",             },             --[[            -- iOS app URL schemes:             CFBundleURLTypes =             {                 {                     CFBundleURLSchemes =                     {                         "fbXXXXXXXXXXXXXX", -- example scheme for facebook                         "coronasdkapp", -- example second scheme                     }                 }             }             --]]         }     }, }

This tutorial will help you understand your build.settings    http://coronalabs.com/blog/2014/07/08/tutorial-understanding-build-settings/

Rob

Thank you Rob for your advices. I will study build.setting tutorial.

When can I signal the alert box bug, so that it can be fixed?

Take care

The rotation thing looks like a bug.

Hi everybody,

Is there some new about the “rotation bug”?

It’s been assigned to an Engineer and it’s in their queue.  No ETA.

Rob

Hello Davide,

Did you make the changes to your build.settings as Rob suggested? In specific, remove the “content = “portrait”,” line from your “orientation” table (or comment it out). This might cause odd behavior with the native alert box and the Corona content area (stage), as the stage will lock to that orientation but the native elements will not.

Take care,

Brent 

Yes I did Brent. But it doesn’t solve the problem.

Can you be more specific as to the problem?  On iOS when a native.alert box shows, it dims the screen slightly.  I don’t see anything in the screen shot that’s unusual.

Is your issue because it’s graying out or because the dialog box is showing?

Rob

The problem is that the alert box becomes dark, this because the background is dark green. I tried with withe background and the alert box is bright white. I don’t like this situation because the alert box appears bright white and after 0.5 second becames dark. Can I remove the alert box’s slight transparency? 
But now I have another issue with alert box. My app can work only on portrait mode, but when i rotate the device everything stay on portrait mode but the alert box rotate and a part is cutoff as you can see in the attachment 9qAdT1A.png?1

Can you post your config.lua and build.settings?

As far as  the darkening of the screen, that’s the OS showing a native.alert box.  If you are doing a native.showAlert() you’re going to get that effect.  If you don’t want the native behavior, you can always build your own message box.  If you’re using composer, you could use an overlay scene, but a simple display.newContainer() with a display.newText() and a widget.newButton() .

Rob

Thanks Bob for your help, 

This is build.settings

-- Supported values for orientation: -- portrait, portraitUpsideDown, landscapeLeft, landscapeRight settings = { orientation = { default = "portrait", content = "portrait", supported = { "portrait", } }, androidPermissions = { "android.permission.INTERNET", }, iphone = { plist = { UIStatusBarHidden = false, UIPrerenderedIcon = true, -- set to false for "shine" overlay UIInterfaceOrientation = "UIInterfaceOrientationportrait", UISupportedInterfaceOrientations="UIInterfaceOrientationportrait", --UIApplicationExitsOnSuspend = true, -- uncomment to quit app on suspend --[[-- iOS app URL schemes: CFBundleURLTypes = { { CFBundleURLSchemes = { "fbXXXXXXXXXXXXXX", -- example scheme for facebook "coronasdkapp", -- example second scheme } } } --]] } }, --[[-- Android permissions androidPermissions = { "android.permission.INTERNET", },]]-- } iphone = { plist = { UIAppFonts = { "Impact.ttf", "Calibri.ttf", }, UIApplicationExitsOnSuspend = true }, } 

and this is my config.lua

application = { content = { width = 320, height = 480, scale = "letterbox" , fps = 30, }, }

I would suspect this is the problem:

            UIInterfaceOrientation = “UIInterfaceOrientationportrait”,
            UISupportedInterfaceOrientations=“UIInterfaceOrientationportrait”,

I’m pretty sure the “P” in portrait should capitalized.  You however do not have to specify those as that’s what our “orientation” block is supposed to do.

That may take care of the orientation problem.

Rob

  UIInterfaceOrientation = “UIInterfaceOrientationportrait”,
            UISupportedInterfaceOrientations=“UIInterfaceOrientationportrait”,

I tried to write Portrait with capitalized P but it also doesn’t work. I also tried to remove those 2 line of code, the result is the same.  :frowning:

The rotation thing looks like a bug.  But that said, your build.settings does have some issues.  Here is a cleaned up version:

-- Supported values for orientation: -- portrait, portraitUpsideDown, landscapeLeft, landscapeRight settings = {          orientation = {         default = "portrait",         --content = "portrait",         supported = { "portrait", }     },          android = {        androidPermissions = {             "android.permission.INTERNET",         },     },          iphone = {         plist = {             UIStatusBarHidden = false,             UIPrerenderedIcon = true, -- set to false for "shine" overlay             UIInterfaceOrientation = "UIInterfaceOrientationPortrait",             UISupportedInterfaceOrientations="UIInterfaceOrientationPortrait",             UIAppFonts =             {                 "Impact.ttf",                 "Calibri.ttf",             },             --[[            -- iOS app URL schemes:             CFBundleURLTypes =             {                 {                     CFBundleURLSchemes =                     {                         "fbXXXXXXXXXXXXXX", -- example scheme for facebook                         "coronasdkapp", -- example second scheme                     }                 }             }             --]]         }     }, }

This tutorial will help you understand your build.settings    http://coronalabs.com/blog/2014/07/08/tutorial-understanding-build-settings/

Rob