Strangely, my app does not use any plugins or libraries other than the stock lua socket and bit libraries that come with the Corona.
So far the only proofing I have done was inside the app I added a few lines of code to track all of the system messages sent to the app. Then after the app starts, I use an native alert box to print a string of all of the messages received.
What was interesting is that in the simulator and also using the live build my app reported that only the applicationStart message was received. Then when I compiled it into an .ipa and installed it on the iPad through xcode, it reported that it received 4 messages.
-
applicationStart
-
applicationStart
-
applicationSuspend
-
applicationResume
This is hardly real proof, I need to separate the code into simple app and prove it out that way too make sure something in my app is not interfering with it like in scenarios you are asking about.
FYI only. if you want to see how os.exit works the code is quite simple:
local function handleSystemEvent(event)
if(event.type==“applicationSuspend”)then
os.exit()
end
end
Runtime:addEventListener( “system”, handleSystemEvent )
that can be compiled and run on an ipad. then compared with the results of the following code
local function handleSystemEvent(event)
if(event.type==“applicationSuspend”)then
os.someMadeUpMethod()
end
end
Runtime:addEventListener( “system”, handleSystemEvent )
Anyway I will post the code / results of my independent test for system messages after they are finished.