I’m at point of finishing my game, this means it is almost done, and have many features tested successfully in the past, but i jusr realized, that a previously working event handler doesn’t do it’s job anymore. The case is simple, the applicationExit system event is not triggered anymore on the device. In simulator it works perfectly. In my case some game related variables are saved at this time, and database is also closed in this handler.
This issue is present (at least) from build version #976, and still there with the latest build #1008.
Tested on iPhone4, iPhone4S, iPad2, iPad3 iOS 5 & iOS 6
Did anyone also experienced this issue?
It can be tested with a simple print command.
in main.lua:
[code]
local function onSystemEvent( event )
if event.type == “applicationExit” then
print(“applicationExit system event triggered only in simulator”)
–if BI.game then game.onExit() end
–db.updatesettings()
–db.closedb()
end
end
Runtime:addEventListener( “system”, onSystemEvent )
[/code] [import]uid: 88330 topic_id: 35213 reply_id: 335213[/import]