iOS 8 Beta 5 : Native Alert Box Problem

I updated my iOS device to iOS8 beta5 yesterday and noticed alert boxes are no longer displays properly.

More specifically, if I did not specify a button (creating a modal alert, dismissed by timer), the alert box would only show the title and not the body message.

local alert = native.showAlert ("Alert Title", "Alert Body Message");

However as soon as I supply a button, the body message will show up correctly.

local alert = native.showAlert ("Alert Title", "Alert Body Message", {"OK"});

Prior to Beta5, the body message will still show even without button information supplied. 

I’m not sure if this is a rule changed by Apple, or simply a bug in this version of Beta. Anyone have similar problems?

I just tried it on my app and had exactly the same issue. No button - title only, no body. With button - all shown. iPhone 5, iOS8 beta 5

Have you filed a bug with Apple? https://developer.apple.com/bug-reporting/

Native things may be an Apple issue.  I have a non-Corona game I play and early on with beta’s, when it would try to show a native dialog, it would crash.  Starting with beta 4 and now with beta 5, it simply doesn’t show the native dialog, but it no longer crashes.

Thanks for the confirmations ! I haven’t filed a bug report with Apple but will do that next.

If we supply a text-less button, the alert body+button blended together pretty well on iOS 8, so it looked like it’s just a bigger alert box with more white space.

local alert = native.showAlert ("Alert Title", "Alert Body Message", {""});

My temporary workaround involves a quick OS-version check, anything < iOS8 then just do it the correct way and don’t supply a button.

local btn = ((string.sub(system.getInfo("model"),1,2) == "iP") and (tonumber(string.sub(system.getInfo ("platformVersion"), 1, 1)) == 8)) and ({""}) or (nil); local alert = native.showAlert ("Alert Title", "Alert Body Message", btn);

One of my friend is facing the same issue, all the boxes are not displaying on the screen. I mailed regarding the same issue, I think this issue is from Apple’s end, although the iOS8 is in beta version.

I just tried it on my app and had exactly the same issue. No button - title only, no body. With button - all shown. iPhone 5, iOS8 beta 5

Have you filed a bug with Apple? https://developer.apple.com/bug-reporting/

Native things may be an Apple issue.  I have a non-Corona game I play and early on with beta’s, when it would try to show a native dialog, it would crash.  Starting with beta 4 and now with beta 5, it simply doesn’t show the native dialog, but it no longer crashes.

Thanks for the confirmations ! I haven’t filed a bug report with Apple but will do that next.

If we supply a text-less button, the alert body+button blended together pretty well on iOS 8, so it looked like it’s just a bigger alert box with more white space.

local alert = native.showAlert ("Alert Title", "Alert Body Message", {""});

My temporary workaround involves a quick OS-version check, anything < iOS8 then just do it the correct way and don’t supply a button.

local btn = ((string.sub(system.getInfo("model"),1,2) == "iP") and (tonumber(string.sub(system.getInfo ("platformVersion"), 1, 1)) == 8)) and ({""}) or (nil); local alert = native.showAlert ("Alert Title", "Alert Body Message", btn);

One of my friend is facing the same issue, all the boxes are not displaying on the screen. I mailed regarding the same issue, I think this issue is from Apple’s end, although the iOS8 is in beta version.

Had same problem, it shows the alert but repeats itself and doesn’t allow other functions to run.

You guys know how long this sort of problems take to resolve? Shall we just make a text box instead of native?

You should not be seeing alert issues with the current Corona SDK build.  This was an issue in iOS 8 beta that Apple resolved.  It didn’t impact Corona SDK.

If you are having an issue, perhaps its a problem with your code.  Please build the sample app:  SampleCode/Interface/Alert and see if it’s having issues.

Rob

To answer your question about how long do bug fixes take,  we tend to release new public builds every 3-4 months on average: sometimes a bit sooner, sometimes a bit later.  The current public build was released August 5, 2014.  We are working towards the next public build now.  In the time between public releases we offer daily builds to Pro and Enterprise level subscribers. 

Access to daily builds is a huge benefit, specially when Apple drops a big OS change on us like they did with iOS 8.  Getting access to those changes months in advance is a really important feature for many developers.

Rob

Hi Rob,

I tried a simple code as below and still get the same issue. tried both iPhone 4 (iOS7.1.2) and iPhone 6 (iOS 8.1) and mac latest updates. My corona build is 2014.2393. Not sure the other guys problem is solved?

local widget = require( “widget” )


local mana = function( event )

 --local myText = display.newText( manat[i], 100, 200, native.systemFont, 16 )

 local alert = native.showAlert( “test2”, manat1, { “Ok”, } )

end

local mana1 = function( event )

 --local myText = display.newText( manat[i], 100, 200, native.systemFont, 16 )

 local alert = native.showAlert( “test2”, manat2, { “Ok”, } )

 print (“test123”)

end

beforeB = widget.newButton

{

defaultFile = “masal.png”,

overFile = “masalOver.png”,

label = “1”,

fontSize = 16,

labelColor =

{

default = { 0, 0, 0 },

},

emboss = true,

onPress = mana,

}

beforeB.x, beforeB.y = 50, 440


beforeB = widget.newButton

{

defaultFile = “masal.png”,

overFile = “masalOver.png”,

label = “1”,

fontSize = 16,

labelColor =

{

default = { 0, 0, 0 },

},

emboss = true,

onPress = mana1,

}

beforeB.x, beforeB.y = 50, 240


masalt1=“test1”

masalt2=“test2”

manat1=“test3”

manat2=“test4”

Had same problem, it shows the alert but repeats itself and doesn’t allow other functions to run.

You guys know how long this sort of problems take to resolve? Shall we just make a text box instead of native?

You should not be seeing alert issues with the current Corona SDK build.  This was an issue in iOS 8 beta that Apple resolved.  It didn’t impact Corona SDK.

If you are having an issue, perhaps its a problem with your code.  Please build the sample app:  SampleCode/Interface/Alert and see if it’s having issues.

Rob

To answer your question about how long do bug fixes take,  we tend to release new public builds every 3-4 months on average: sometimes a bit sooner, sometimes a bit later.  The current public build was released August 5, 2014.  We are working towards the next public build now.  In the time between public releases we offer daily builds to Pro and Enterprise level subscribers. 

Access to daily builds is a huge benefit, specially when Apple drops a big OS change on us like they did with iOS 8.  Getting access to those changes months in advance is a really important feature for many developers.

Rob

Hi Rob,

I tried a simple code as below and still get the same issue. tried both iPhone 4 (iOS7.1.2) and iPhone 6 (iOS 8.1) and mac latest updates. My corona build is 2014.2393. Not sure the other guys problem is solved?

local widget = require( “widget” )


local mana = function( event )

 --local myText = display.newText( manat[i], 100, 200, native.systemFont, 16 )

 local alert = native.showAlert( “test2”, manat1, { “Ok”, } )

end

local mana1 = function( event )

 --local myText = display.newText( manat[i], 100, 200, native.systemFont, 16 )

 local alert = native.showAlert( “test2”, manat2, { “Ok”, } )

 print (“test123”)

end

beforeB = widget.newButton

{

defaultFile = “masal.png”,

overFile = “masalOver.png”,

label = “1”,

fontSize = 16,

labelColor =

{

default = { 0, 0, 0 },

},

emboss = true,

onPress = mana,

}

beforeB.x, beforeB.y = 50, 440


beforeB = widget.newButton

{

defaultFile = “masal.png”,

overFile = “masalOver.png”,

label = “1”,

fontSize = 16,

labelColor =

{

default = { 0, 0, 0 },

},

emboss = true,

onPress = mana1,

}

beforeB.x, beforeB.y = 50, 240


masalt1=“test1”

masalt2=“test2”

manat1=“test3”

manat2=“test4”