diff --git a/Coffeefy.xcodeproj/project.pbxproj b/Coffeefy.xcodeproj/project.pbxproj index 108c74c..8eba1c9 100644 --- a/Coffeefy.xcodeproj/project.pbxproj +++ b/Coffeefy.xcodeproj/project.pbxproj @@ -359,7 +359,7 @@ DEVELOPMENT_TEAM = PJ627876A5; INFOPLIST_FILE = Coffeefy/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.11; PRODUCT_BUNDLE_IDENTIFIER = kim.taegon.Coffeefy; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 3.0; @@ -376,7 +376,7 @@ DEVELOPMENT_TEAM = PJ627876A5; INFOPLIST_FILE = Coffeefy/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.11; PRODUCT_BUNDLE_IDENTIFIER = kim.taegon.Coffeefy; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 3.0; diff --git a/Coffeefy/AppDelegate.swift b/Coffeefy/AppDelegate.swift index 99e3a51..3dd372f 100644 --- a/Coffeefy/AppDelegate.swift +++ b/Coffeefy/AppDelegate.swift @@ -89,11 +89,13 @@ class AppDelegate: NSObject, NSApplicationDelegate { func startAnimatingStatusImage() { currentIconIndex = 0 - updateStatusImage(index: 0) + updateStatusImage(index: currentIconIndex) - animTimer = Timer.scheduledTimer(withTimeInterval: 4.0/15.0, repeats: true){ timer in - self.currentIconIndex = ( self.currentIconIndex + 1 ) % 4 - self.updateStatusImage(index: self.currentIconIndex) + if #available(OSX 10.12, *) { + animTimer = Timer.scheduledTimer(withTimeInterval: 4.0/15.0, repeats: true){ timer in + self.currentIconIndex = ( self.currentIconIndex + 1 ) % 4 + self.updateStatusImage(index: self.currentIconIndex) + } } } @@ -105,7 +107,7 @@ class AppDelegate: NSObject, NSApplicationDelegate { } func updateStatusImage(index: Int) { - loadStatusImage(name: "coffeefy\(currentIconIndex)") + loadStatusImage(name: "coffeefy\(index)") } @IBAction func openPreference(sender: AnyObject?) { diff --git a/Coffeefy/Info.plist b/Coffeefy/Info.plist index 5b09d51..0fa7da4 100644 --- a/Coffeefy/Info.plist +++ b/Coffeefy/Info.plist @@ -19,7 +19,7 @@ CFBundleShortVersionString 1.1 CFBundleVersion - 1 + 2 LSApplicationCategoryType public.app-category.productivity LSMinimumSystemVersion