From 6c71cfe4b7d5cf239f7429b150b4aa38440f1971 Mon Sep 17 00:00:00 2001 From: Zhuhao Wang Date: Wed, 19 Jul 2017 09:55:07 +0800 Subject: [PATCH] Fix that launch helper is not terminated if the app is already running. --- Changelog.md | 1 + SpechtLiteLaunchHelper/AppDelegate.m | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Changelog.md b/Changelog.md index 2431ff3..0c49abf 100644 --- a/Changelog.md +++ b/Changelog.md @@ -2,6 +2,7 @@ ### Fixed - Fix that the app will not auto start sometimes. +- Fix some logic in auto start. ## 0.10.6 diff --git a/SpechtLiteLaunchHelper/AppDelegate.m b/SpechtLiteLaunchHelper/AppDelegate.m index 53ea0ce..f7a23d6 100644 --- a/SpechtLiteLaunchHelper/AppDelegate.m +++ b/SpechtLiteLaunchHelper/AppDelegate.m @@ -21,8 +21,9 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { NSString *path = [NSString pathWithComponents:pathComponents]; NSString *binaryPath = [[NSBundle bundleWithPath:path] executablePath]; [[NSWorkspace sharedWorkspace] launchApplication:binaryPath]; - [NSApp terminate:nil]; } -} + [NSApp terminate:nil]; +} + @end