Black Screen after Dismissing Ad (iOS)

Hi there,

First I’d like to echo the comments in the other threads – the ads are quite attractive, and the support I’ve seen in the other threads has been excellent.

On iOS, I’m seeing an issue where the screen goes black after I dismiss an ad.  Here is my simple test case that exhibits the bug:

build.settings

settings = { orientation = { default = "portrait", content = "portrait", supported = { "portrait" }, }, plugins = { ["plugin.adbuddiz"] = { publisherId = "com.adbuddiz" } } }

main.lua

local AdBuddiz = require("plugin.adbuddiz") -- Display a red rectangle so it's obvious when the screen goes black local rect = display.newRect(100,100, 200,200) rect:setFillColor(1,0.5,0.5) -- Print the time every second to the console to tell if the app is still running timer.performWithDelay(1000, function() print(os.time()) end, 0) AdBuddiz.setIOSPublisherKey("IOS-PUBLISHER-ID") AdBuddiz.cacheAds() -- Display an ad after 3 seconds to allow some time for ads to cache timer.performWithDelay(3000, AdBuddiz.showAd)

Replace the iOS publisher ID with a valid ID.

Launch the app and an ad will display in 3 seconds.  After tapping the ‘x’ button, the red rectangle will disappear (sometimes just for a second, but usually permanently).  Note that the app has not crashed: the time still prints to the console every second, and the rectangle does reappear if you exit and re-enter the app.  This suggests the problem is has something to do with the Corona OpenGL canvas not re-rendering after an ad is dismissed.

I tested and saw this bug on both an iPhone 5 running iOS 7.1.1 and an iPad 3 running iOS 7.0.4.  I built with Corona 2318.

Thanks!

  • Andrew

Hi Andrew,

Thanks for your nice words.

Regarding your problem it’s really weird. After many tests we found out that the content = “portrait”, in your build.settings is responsible for the bug.

We don’t really understand why but just removing it to get the following orientation settings will make the bug disappear:

orientation = { default = "portrait", supported = { "portrait", } }, 

Is this settings mandatory for you? With the corona documentation I’m not sure to fully understand what its purpose is and if the behavior of your app will change without. What do you think?

Hi there,

Great catch.  It so happens that my current doesn’t need that setting, so yes, removing it fixes the issue.  Thanks!

  • Andrew

Hi, I had the same problem and I fix it the same way

I remove the "content = “portrait” as you said.

thanks for the reply.

the problem should be fix anyways.

Corona build  2323.

ipod 5  - ios 6.1

Hi Andrew,

Thanks for your nice words.

Regarding your problem it’s really weird. After many tests we found out that the content = “portrait”, in your build.settings is responsible for the bug.

We don’t really understand why but just removing it to get the following orientation settings will make the bug disappear:

orientation = { default = "portrait", supported = { "portrait", } }, 

Is this settings mandatory for you? With the corona documentation I’m not sure to fully understand what its purpose is and if the behavior of your app will change without. What do you think?

Hi there,

Great catch.  It so happens that my current doesn’t need that setting, so yes, removing it fixes the issue.  Thanks!

  • Andrew

Hi, I had the same problem and I fix it the same way

I remove the "content = “portrait” as you said.

thanks for the reply.

the problem should be fix anyways.

Corona build  2323.

ipod 5  - ios 6.1