Quite strange question - how to exit sio manually?
2 posters
Quite strange question - how to exit sio manually?
I want to add exit button in my menu, here is callback function of widget tap:
Always hang device. Also tried sio2->_SIO2window->_SIO2windowrender = templateShutdown; but effect is the same - hanged device. How properly exit game without iPhone Home button?
Regards,
Mad
- Code:
void exit_callback(void*, void*, vec2*)
{
sio2ResourceUnloadAll(sio2->_SIO2resource);
sio2ResourceUnloadAll(level_demo);
sio2ResourceUnloadAll(menu);
sio2->_SIO2resource = sio2ResourceFree(sio2->_SIO2resource);
level_demo = sio2ResourceFree(level_demo);
menu = sio2ResourceFree(menu);
sio2->_SIO2window = sio2WindowFree(sio2->_SIO2window);
sio2 = sio2Shutdown();
printf("\nSIO2: shutdown...\n");
}
Always hang device. Also tried sio2->_SIO2window->_SIO2windowrender = templateShutdown; but effect is the same - hanged device. How properly exit game without iPhone Home button?
Regards,
Mad
_-MADMAN-_- Posts : 52
Join date : 2009-04-23
Re: Quite strange question - how to exit sio manually?
Is it stiupid question or there is no answer? If anyone knows how to manually shut down app I will really appreciate Your advice.
_-MADMAN-_- Posts : 52
Join date : 2009-04-23
Re: Quite strange question - how to exit sio manually?
First, let me say that, from what I've read, Apple policy forbids an app from exiting manually. According to Apple philosophy, an app should only exit when the user presses the home button.
Here's a way to do it, via an undocumented API function:
1. Add this to your .h
Just don't expect to have your app aproved for AppStore.
Best regards,
André
Here's a way to do it, via an undocumented API function:
1. Add this to your .h
- Code:
@interface UIApplication (extended)
-(void) terminateWithSuccess;
@end
- Code:
[[UIApplication sharedApplication] terminateWithSuccess];
Just don't expect to have your app aproved for AppStore.
Best regards,
André
Similar topics
» alpha blending manually
» gcc-4.2 failed with exit code 1 library not found for -lstdc++-static
» strange problem
» Strange problem with sio2ObjectMapBuffer
» strange alpha behaviour
» gcc-4.2 failed with exit code 1 library not found for -lstdc++-static
» strange problem
» Strange problem with sio2ObjectMapBuffer
» strange alpha behaviour
Permissions in this forum:
You cannot reply to topics in this forum