Game Development Community

Phone Received / Home Button

by Marc Dreamora Schaerer · in iTorque 2D · 11/02/2008 (1:44 pm) · 5 replies

What is the event generated / callback called if the homebutton is pressed or a phone call is received?
So we are able to save the state of our games when that happens and restart them where they were?

#1
11/03/2008 (9:20 am)
I'm not sure how it's tied into the iTorque engine, but I know at the top level this is the Obj-C event sent to the app delegate

- (void)applicationWillTerminate:(UIApplication *)application
#2
11/03/2008 (1:43 pm)
:)

Yeah I know. Hoped that it is already integrated with Torque Script in some way
#3
12/03/2008 (4:00 pm)
Not to be a pest, but we are at the stage where we need to start worrying about this, and no one has answered it.

How is the the pressing of the Home button or answering a phone call integrated into iTGB? I assume there is (or will be) a callback to warn us that the user is shutting us down so we can save first?

This is really pretty important to a good user experience!

Thanks to anyone who can enlighten me on this subject.
#4
12/03/2008 (5:51 pm)
Unless you do it yourself in the XCode project, there is nothing currently that will give you such functionality.
The only way to circumvent that right now is having a script thats scheduled every X ms and that stores the state continously
#5
12/04/2008 (6:08 pm)
Okay, very good news! Paul tells me that this is already in the new version that is coming!

Thanks Paul, keep up the good work!