diff --git a/mac/keyrace-mac.xcodeproj/project.pbxproj b/mac/keyrace-mac.xcodeproj/project.pbxproj
index 3f1e074..26c2075 100644
--- a/mac/keyrace-mac.xcodeproj/project.pbxproj
+++ b/mac/keyrace-mac.xcodeproj/project.pbxproj
@@ -3,10 +3,11 @@
archiveVersion = 1;
classes = {
};
- objectVersion = 50;
+ objectVersion = 51;
objects = {
/* Begin PBXBuildFile section */
+ 24AF66DA25DE66C500C6DB2C /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 4137816025A19C3B004AD04D /* Info.plist */; };
4137815825A19C3A004AD04D /* keyrace_macApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4137815725A19C3A004AD04D /* keyrace_macApp.swift */; };
4137815C25A19C3B004AD04D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4137815B25A19C3B004AD04D /* Assets.xcassets */; };
4137815F25A19C3B004AD04D /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4137815E25A19C3B004AD04D /* Preview Assets.xcassets */; };
@@ -154,6 +155,7 @@
files = (
4137815F25A19C3B004AD04D /* Preview Assets.xcassets in Resources */,
4137815C25A19C3B004AD04D /* Assets.xcassets in Resources */,
+ 24AF66DA25DE66C500C6DB2C /* Info.plist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -347,7 +349,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
- MACOSX_DEPLOYMENT_TARGET = 11.0;
+ MACOSX_DEPLOYMENT_TARGET = 10.15;
PRODUCT_BUNDLE_IDENTIFIER = org.nat.keyrace;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
@@ -370,7 +372,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
- MACOSX_DEPLOYMENT_TARGET = 11.0;
+ MACOSX_DEPLOYMENT_TARGET = 10.15;
PRODUCT_BUNDLE_IDENTIFIER = org.nat.keyrace;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
diff --git a/mac/keyrace-mac.xcworkspace/contents.xcworkspacedata b/mac/keyrace-mac.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..37c6665
--- /dev/null
+++ b/mac/keyrace-mac.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
diff --git a/mac/keyrace-mac.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/mac/keyrace-mac.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/mac/keyrace-mac.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/mac/keyrace-mac/Info.plist b/mac/keyrace-mac/Info.plist
index a2e5576..5cb6a34 100644
--- a/mac/keyrace-mac/Info.plist
+++ b/mac/keyrace-mac/Info.plist
@@ -2,6 +2,8 @@
+ NSPrincipalClass
+ keyrace_mac.NatApplication
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
diff --git a/mac/keyrace-mac/keyrace_macApp.swift b/mac/keyrace-mac/keyrace_macApp.swift
index 2b80bec..81f72dc 100644
--- a/mac/keyrace-mac/keyrace_macApp.swift
+++ b/mac/keyrace-mac/keyrace_macApp.swift
@@ -15,17 +15,6 @@ import Foundation
import Accessibility
import Cocoa
-@available(OSX 11.0, *)
-@main
-struct MenuBarPopoverApp: App {
- @NSApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
- var body: some Scene {
- Settings{
- EmptyView()
- }
- }
-}
-
func formatCount(count: Int) -> String {
var str = ""
@@ -376,6 +365,7 @@ class KeyTap {
}
}
+@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {
var statusBarItem: NSStatusItem!
var menubarItem: MenubarItem?
@@ -397,3 +387,18 @@ class AppDelegate: NSObject, NSApplicationDelegate {
// Insert code here to tear down your application
}
}
+
+class NatApplication: NSApplication {
+
+ let strongDelegate = AppDelegate()
+
+ override init() {
+ super.init()
+ self.delegate = strongDelegate
+ }
+
+ required init?(coder: NSCoder) {
+ fatalError("init(coder:) has not been implemented")
+ }
+
+}