when call
dispatch_async(dispatch_get_main_queue(), ^{
[NSApp terminate:nil];
});
have receive applicationWillTerminate:(NSNotification *)aNotification
but next time check pid still have pre pid and call [NSRunningApplication runningApplicationsWithBundleIdentifier:@"***"]; return two apps
Post
Replies
Boosts
Views
Activity
error: Error Domain=NSCocoaErrorDomain Code=256 "The application “Google Chrome” could not be launched because a miscellaneous error occurred." UserInfo={NSURL=file:///Applications/Google%20Chrome.app/, NSLocalizedDescription=The application “Google Chrome” could not be launched because a miscellaneous error occurred., NSUnderlyingError=0x6000038376c0 {Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x6000038349f0 {Error Domain=OSLaunchdErrorDomain Code=112 "Could not find specified domain" UserInfo={NSLocalizedFailureReason=Could not find specified domain}}}}}