Considering Mac OS X/Cocoa threading model, take care not to directly perform application features from the custom application delegate (AppDelegate), but request it (with wrappers launch and tearDown) to be run asynchronously by Cocoa main loop.
OS-dependent AppUtil