iPhone home button (SOLVED)
by Myles Blasonato · in iTorque 2D · 01/31/2011 (6:29 am) · 6 replies
Hi guys,
I'm getting a memory leak problem and I think it's because I don't call the function endGame();
I can play the game once on the iPhone but then it won't play anymore.
I was wondering if there is a way to receive a callback for when you press an iDevices home button (massive button down the button with a square in it).
The reason I ask is because if I can get that event then I can call the endGame(); function from inside of that.
Cheers,
Myles Blasonato.
PS: Plus that feature is very useful.
I'm getting a memory leak problem and I think it's because I don't call the function endGame();
I can play the game once on the iPhone but then it won't play anymore.
I was wondering if there is a way to receive a callback for when you press an iDevices home button (massive button down the button with a square in it).
The reason I ask is because if I can get that event then I can call the endGame(); function from inside of that.
Cheers,
Myles Blasonato.
PS: Plus that feature is very useful.
About the author
A passionate game designer that has worked on some great games such as Lost Monsters.
#2
Thanks for the reply. However I couldn't find the plist. Where abouts is it?
Also my game wasn't building in the SDK due to this usleep thing so I commented it out and now it works. Should I have done that?
Cheers,
Myles Blasonato.
01/31/2011 (4:33 pm)
Hi Marc :)Thanks for the reply. However I couldn't find the plist. Where abouts is it?
Also my game wasn't building in the SDK due to this usleep thing so I commented it out and now it works. Should I have done that?
Cheers,
Myles Blasonato.
#3
As for the plist: its in the project folder of the xcode project (the plist is no Torque thing but related to XCode and the setup there).
for more see maniacdev.com/2010/07/screw-multi-tasking-how-to-make-your-ios-4-apps-exit-for-r... :)
01/31/2011 (6:19 pm)
out of my view, no you shouldn't have done it, you should have added the import thats missing in the 4.x SDKs.As for the plist: its in the project folder of the xcode project (the plist is no Torque thing but related to XCode and the setup there).
for more see maniacdev.com/2010/07/screw-multi-tasking-how-to-make-your-ios-4-apps-exit-for-r... :)
#4
Could you please elaborate on the first part about adding the missing import.
Cheers,
Myles Blasonato.
01/31/2011 (6:28 pm)
Thanks for the great response Marc :)Could you please elaborate on the first part about adding the missing import.
Cheers,
Myles Blasonato.
Torque 3D Owner Marc Dreamora Schaerer
Gayasoft
what you need to do is specify the key in the PLIST which makes the application terminate when its suspended so it does not stay in memory when iOS switches out of the app with iOS 4.0+