meeloo/nui

iOS nglUIWindow applicationWillTerminate cause uncaught exception

Closed this issue · 0 comments

When force-quitting an app, the 'applicationWillTerminate' implementation in nglUIWindow calls a non-existent function on enumerated UIWindow's, causing an objc "unrecognized selector" error.

- (void) applicationWillTerminate:            (UIApplication*) pUIApplication
{
  //App->TimedPrint("nglUIApplicationDelegate applicationWillTerminate");
//  NGL_DEBUG( NGL_OUT("[nglUIApplicationDelegate applicationWillTerminate]\n") );

    objCCallOnWillExit();

    NSEnumerator *e = [[pUIApplication windows] objectEnumerator];

    id win;
    while ((win = [e nextObject]))
  {
        [win close];
    }   


///< advise the kernel we're quiting
  objCCallOnExit(0);
}

close method doesn't exist on UIWindow class

Tested on iOS 9.3.2