Hi CoronaLabs,
You have done a marvellous job on fixing IOS crashes at short notice, especially the Game Center orientation crash.
Sorry to say, here is another one! Hope you can do the same for this one!
analytics.init() reliably crashes on iOS6, iPhone 4. Does not crash on earlier iOS versions or Xcode simulator.
The following code will work properly the first time… BUT if you press the home button during analytics.init() the app crashes the next time you launch it. Note that I am using UIApplicationExitsOnSuspend = true in build.settings and I am using a valid analytics ID from Flurry.
If you remove the timer, the issue goes away (but the timer recreates what you might do with a splash screen)
I am also raising a bug report, but have put it here to warn those about to submit apps (like me!)
Any ideas for workarounds in the meantime?
Regards,
Anthony
Here’s how to reproduce:
main.lua:
-- Go Yeti! main.lua
local analytics = require("analytics");
mytext = display.newText("analytics.init()", 0.3\*display.contentWidth,
0.5\*display.contentHeight, nil, 20);
analytics.init("YOUR\_ANALYTICS\_ID")
local function start()
mytext.text = "Main game starts now"
end
timer.performWithDelay(4000, start);
build.settings
-- Go Yeti! build.settings
settings =
{
orientation =
{
default = "landscapeRight",
supported = { "landscapeLeft", "landscapeRight" },
},
iphone =
{
plist =
{
UIApplicationExitsOnSuspend = true,
},
}
}
config.lua
-- Go Yeti! config.lua
application =
{
content =
{
width = 320,
height = 480,
scale = "zoomStretch", -- scales content to fit screen
fps = 30
}
}
[import]uid: 87194 topic_id: 31854 reply_id: 331854[/import]