Skip to content

Commit

Permalink
Target to swift 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
aisk committed Oct 13, 2018
1 parent 67f9f12 commit 5b0befd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
7 changes: 5 additions & 2 deletions MySensors.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
TargetAttributes = {
479D566E1D97A76D00713B6E = {
CreatedOnToolsVersion = 8.0;
LastSwiftMigration = 1000;
ProvisioningStyle = Automatic;
};
};
Expand Down Expand Up @@ -250,7 +251,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = me.aisk.MySensors;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -263,7 +265,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = me.aisk.MySensors;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand Down
8 changes: 4 additions & 4 deletions MySensors/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSMenuDelegate {
let alert = NSAlert()
alert.messageText = "initailize SMC failed!"
alert.runModal()
NSApplication.shared().terminate(self)
NSApplication.shared.terminate(self)
}

statusItem = NSStatusBar.system().statusItem(withLength: NSSquareStatusItemLength)
statusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.squareLength)
let icon = NSImage(named: "ic_memory")
icon?.isTemplate = true
statusItem.image = icon
Expand All @@ -36,8 +36,8 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSMenuDelegate {
let _ = SMCKit.close()
}

func onQuitMenuItemClicked(_ sender: NSMenuItem) {
NSApplication.shared().terminate(self)
@objc func onQuitMenuItemClicked(_ sender: NSMenuItem) {
NSApplication.shared.terminate(self)
}

func menuWillOpen(_ menu: NSMenu) {
Expand Down

0 comments on commit 5b0befd

Please sign in to comment.