Hi
I think the delegate method applicationWillResignActive is never called when you quit the application and back to Home.
So I have tried to implement the delegate method applicationWillTerminate but the same problem occured.
[code]@interface JuceAppStartupDelegate : NSObject
{
}
- (void) applicationDidFinishLaunching: (UIApplication*) application;
- (void) applicationWillResignActive: (UIApplication*) application;
- (void) applicationWillTerminate:(UIApplication *)application;
@end
@implementation JuceAppStartupDelegate
-
(void) applicationDidFinishLaunching: (UIApplication*) application
{
String dummy;if (! juce_intialisingApp->initialiseApp (dummy))
exit (0);
} -
(void) applicationWillResignActive: (UIApplication*) application
{
JUCEApplication::shutdownAppAndClearUp();
} -
(void) applicationWillTerminate: (UIApplication*) application
{
JUCEApplication::shutdownAppAndClearUp();
}
@end
[/code]
Actually I do not know what is happening, typically UIApplicationDelegate is supposed to be compatible with iPhone framework.
It does not work on Simulator (ipad + iphone) and my iPod Touch device.
I also tried to put a breakpoint on JuceApplication::shutdown() and it is never called.
Thanks.