Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swift 4 + Added Features #2

Merged
merged 5 commits into from
Jan 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ Download this repository and run iOS/watchOS target or download at AppStore last

## Controlling Keynote using Apple Watch

Now, in your Apple Watch, open `WatchNote` app and let's go. Use the buttons to pass foward or back in your slides.
Now, in your Apple Watch, open `WatchNote` app and let's go. Use the buttons to pass foward or back in your slides or do you prefer shaking your wrist? It's possible.

![](https://raw.githubusercontent.com/ezefranca/WatchNote/master/print.png?token=ADerUIw--3bguYeQvgHeVDvw-TruWp10ks5YyKGewA%3D%3D)
![](shake.png)

## How it's works?

Expand All @@ -39,7 +40,7 @@ Made just for fun.

## Future

[ ] Add [WatchShaker](https://github.com/ezefranca/WatchShaker) to use your ⌚️ shake movements to change slides.
[x] Add [WatchShaker](https://github.com/ezefranca/WatchShaker) to use your ⌚️ shake movements to change slides.

## Contribute

Expand Down
110 changes: 81 additions & 29 deletions WatchKeynoteController.xcodeproj/project.pbxproj
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
8BBD93691E6E5B18009DCF65 /* KeySender.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8BBD93671E6E5B18009DCF65 /* KeySender.swift */; };
8BBD936A1E6E5B18009DCF65 /* KeySenderRecivingService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8BBD93681E6E5B18009DCF65 /* KeySenderRecivingService.swift */; };
8BBD936C1E6E77BB009DCF65 /* WatchConnectivity.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BBD936B1E6E77BB009DCF65 /* WatchConnectivity.framework */; };
C9ED359B1FF648E700479A21 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = C9ED35941FF6472F00479A21 /* MainMenu.xib */; };
C9ED359C1FF648EE00479A21 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8BBD93191E6E3E11009DCF65 /* Assets.xcassets */; };
C9ED359E1FF64CE900479A21 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8BBD93411E6E3F19009DCF65 /* Assets.xcassets */; };
C9ED35A01FF65F2300479A21 /* WatchShake.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9ED359F1FF65F2300479A21 /* WatchShake.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -74,7 +78,6 @@
8BBD93141E6E3E11009DCF65 /* WatchKeynoteController.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WatchKeynoteController.app; sourceTree = BUILT_PRODUCTS_DIR; };
8BBD93171E6E3E11009DCF65 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
8BBD93191E6E3E11009DCF65 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
8BBD931C1E6E3E11009DCF65 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
8BBD931E1E6E3E11009DCF65 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
8BBD93281E6E3EF6009DCF65 /* WatchKeynoteControllerApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WatchKeynoteControllerApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
8BBD932A1E6E3EF6009DCF65 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
Expand All @@ -101,6 +104,8 @@
8BBD93671E6E5B18009DCF65 /* KeySender.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KeySender.swift; sourceTree = "<group>"; };
8BBD93681E6E5B18009DCF65 /* KeySenderRecivingService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KeySenderRecivingService.swift; sourceTree = "<group>"; };
8BBD936B1E6E77BB009DCF65 /* WatchConnectivity.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WatchConnectivity.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk/System/Library/Frameworks/WatchConnectivity.framework; sourceTree = DEVELOPER_DIR; };
C9ED35951FF6472F00479A21 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = WatchKeynoteController/Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
C9ED359F1FF65F2300479A21 /* WatchShake.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WatchShake.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -177,7 +182,7 @@
8BBD93671E6E5B18009DCF65 /* KeySender.swift */,
8BBD93681E6E5B18009DCF65 /* KeySenderRecivingService.swift */,
8BBD93191E6E3E11009DCF65 /* Assets.xcassets */,
8BBD931B1E6E3E11009DCF65 /* MainMenu.xib */,
C9ED35941FF6472F00479A21 /* MainMenu.xib */,
8BBD931E1E6E3E11009DCF65 /* Info.plist */,
);
path = WatchKeynoteController;
Expand Down Expand Up @@ -213,6 +218,7 @@
children = (
8BBD93661E6E457C009DCF65 /* WatchKeynoteControllerWatchApp Extension.entitlements */,
8BBD934F1E6E3F19009DCF65 /* InterfaceController.swift */,
C9ED359F1FF65F2300479A21 /* WatchShake.swift */,
8BBD93511E6E3F1A009DCF65 /* ExtensionDelegate.swift */,
8BBD93531E6E3F1A009DCF65 /* NotificationController.swift */,
8BBD93551E6E3F1A009DCF65 /* Assets.xcassets */,
Expand All @@ -239,6 +245,7 @@
buildPhases = (
8BBD93101E6E3E11009DCF65 /* Sources */,
8BBD93111E6E3E11009DCF65 /* Frameworks */,
C9ED359A1FF648E200479A21 /* Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -310,12 +317,13 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0820;
LastUpgradeCheck = 0820;
LastUpgradeCheck = 0920;
ORGANIZATIONNAME = Ezequiel;
TargetAttributes = {
8BBD93131E6E3E11009DCF65 = {
CreatedOnToolsVersion = 8.2.1;
DevelopmentTeam = 54JDK55DR5;
DevelopmentTeam = ENLH686A45;
LastSwiftMigration = 0920;
ProvisioningStyle = Automatic;
SystemCapabilities = {
com.apple.ApplicationGroups.Mac = {
Expand All @@ -325,7 +333,6 @@
};
8BBD93271E6E3EF6009DCF65 = {
CreatedOnToolsVersion = 8.2.1;
DevelopmentTeam = 54JDK55DR5;
ProvisioningStyle = Automatic;
SystemCapabilities = {
com.apple.ApplicationGroups.iOS = {
Expand All @@ -335,7 +342,6 @@
};
8BBD933B1E6E3F19009DCF65 = {
CreatedOnToolsVersion = 8.2.1;
DevelopmentTeam = 54JDK55DR5;
ProvisioningStyle = Automatic;
SystemCapabilities = {
com.apple.ApplicationGroups.iOS = {
Expand All @@ -345,7 +351,6 @@
};
8BBD93471E6E3F19009DCF65 = {
CreatedOnToolsVersion = 8.2.1;
DevelopmentTeam = 54JDK55DR5;
ProvisioningStyle = Automatic;
SystemCapabilities = {
com.apple.ApplicationGroups.iOS = {
Expand Down Expand Up @@ -400,10 +405,20 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
C9ED359E1FF64CE900479A21 /* Assets.xcassets in Resources */,
8BBD93561E6E3F1A009DCF65 /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
C9ED359A1FF648E200479A21 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
C9ED359C1FF648EE00479A21 /* Assets.xcassets in Resources */,
C9ED359B1FF648E700479A21 /* MainMenu.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand Down Expand Up @@ -432,6 +447,7 @@
files = (
8BBD93541E6E3F1A009DCF65 /* NotificationController.swift in Sources */,
8BBD93521E6E3F1A009DCF65 /* ExtensionDelegate.swift in Sources */,
C9ED35A01FF65F2300479A21 /* WatchShake.swift in Sources */,
8BBD93501E6E3F19009DCF65 /* InterfaceController.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -452,14 +468,6 @@
/* End PBXTargetDependency section */

/* Begin PBXVariantGroup section */
8BBD931B1E6E3E11009DCF65 /* MainMenu.xib */ = {
isa = PBXVariantGroup;
children = (
8BBD931C1E6E3E11009DCF65 /* Base */,
);
name = MainMenu.xib;
sourceTree = "<group>";
};
8BBD932E1E6E3EF6009DCF65 /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
Expand All @@ -484,6 +492,14 @@
name = Interface.storyboard;
sourceTree = "<group>";
};
C9ED35941FF6472F00479A21 /* MainMenu.xib */ = {
isa = PBXVariantGroup;
children = (
C9ED35951FF6472F00479A21 /* Base */,
);
name = MainMenu.xib;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */

/* Begin XCBuildConfiguration section */
Expand All @@ -496,15 +512,21 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand Down Expand Up @@ -545,15 +567,21 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand Down Expand Up @@ -583,13 +611,14 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "Mac Developer";
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 54JDK55DR5;
DEVELOPMENT_TEAM = ENLH686A45;
INFOPLIST_FILE = WatchKeynoteController/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.10;
PRODUCT_BUNDLE_IDENTIFIER = com.ezefranca.WatchKeynoteController;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
Expand All @@ -599,13 +628,14 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "Mac Developer";
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 54JDK55DR5;
DEVELOPMENT_TEAM = ENLH686A45;
INFOPLIST_FILE = WatchKeynoteController/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.10;
PRODUCT_BUNDLE_IDENTIFIER = com.ezefranca.WatchKeynoteController;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
};
name = Release;
};
Expand All @@ -616,14 +646,18 @@
CODE_SIGN_ENTITLEMENTS = WatchKeynoteControllerApp/WatchKeynoteControllerApp.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEVELOPMENT_TEAM = 54JDK55DR5;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = WatchKeynoteControllerApp/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.ezefranca.WatchKeynoteControllerApp;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = iphoneos;
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = 1;
};
name = Debug;
Expand All @@ -635,14 +669,18 @@
CODE_SIGN_ENTITLEMENTS = WatchKeynoteControllerApp/WatchKeynoteControllerApp.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEVELOPMENT_TEAM = 54JDK55DR5;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = WatchKeynoteControllerApp/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.ezefranca.WatchKeynoteControllerApp;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = iphoneos;
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = 1;
VALIDATE_PRODUCT = YES;
};
Expand All @@ -655,14 +693,18 @@
CODE_SIGN_ENTITLEMENTS = "WatchKeynoteControllerWatchApp Extension/WatchKeynoteControllerWatchApp Extension.entitlements";
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "iPhone Developer";
DEVELOPMENT_TEAM = 54JDK55DR5;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = "WatchKeynoteControllerWatchApp Extension/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.ezefranca.WatchKeynoteControllerApp.watchkitapp.watchkitextension;
PRODUCT_NAME = "${TARGET_NAME}";
PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = watchos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 3.0;
};
Expand All @@ -675,14 +717,18 @@
CODE_SIGN_ENTITLEMENTS = "WatchKeynoteControllerWatchApp Extension/WatchKeynoteControllerWatchApp Extension.entitlements";
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "iPhone Developer";
DEVELOPMENT_TEAM = 54JDK55DR5;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = "WatchKeynoteControllerWatchApp Extension/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.ezefranca.WatchKeynoteControllerApp.watchkitapp.watchkitextension;
PRODUCT_NAME = "${TARGET_NAME}";
PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = watchos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = 4;
VALIDATE_PRODUCT = YES;
WATCHOS_DEPLOYMENT_TARGET = 3.0;
Expand All @@ -697,11 +743,14 @@
CODE_SIGN_ENTITLEMENTS = WatchKeynoteControllerWatchApp/WatchKeynoteControllerWatchApp.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "iPhone Developer";
DEVELOPMENT_TEAM = 54JDK55DR5;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = "";
IBSC_MODULE = WatchKeynoteControllerWatchApp_Extension;
INFOPLIST_FILE = WatchKeynoteControllerWatchApp/Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = com.ezefranca.WatchKeynoteControllerApp.watchkitapp;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = watchos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
Expand All @@ -718,11 +767,14 @@
CODE_SIGN_ENTITLEMENTS = WatchKeynoteControllerWatchApp/WatchKeynoteControllerWatchApp.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "iPhone Developer";
DEVELOPMENT_TEAM = 54JDK55DR5;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = "";
IBSC_MODULE = WatchKeynoteControllerWatchApp_Extension;
INFOPLIST_FILE = WatchKeynoteControllerWatchApp/Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = com.ezefranca.WatchKeynoteControllerApp.watchkitapp;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = watchos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
Expand Down
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Binary file added WatchKeynoteController/.DS_Store
Binary file not shown.
8 changes: 4 additions & 4 deletions WatchKeynoteController/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ class AppDelegate: NSObject, NSApplicationDelegate {

var server: KeySenderRecivingService?

let statusItem = NSStatusBar.system().statusItem(withLength: NSVariableStatusItemLength)
let statusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.variableLength)

func applicationDidFinishLaunching(_ aNotification: Notification) {

statusItem.image = NSImage(named: "menuIcon")
statusItem.image = NSImage(named: NSImage.Name(rawValue: "menuIcon"))
// statusBar.menu = mainMenu
// statusBar.highlightMode = true
statusItem.menu = statusMenu
Expand All @@ -35,11 +35,11 @@ class AppDelegate: NSObject, NSApplicationDelegate {

if let _ = server {
server = nil
sender.state = NSOffState
sender.state = .off
}
else {
server = KeySenderRecivingService()
sender.state = NSOnState
sender.state = .on
}
}
}
Loading