Skip to content

Commit

Permalink
Recover the storyboard.
Browse files Browse the repository at this point in the history
Here's a macOS programming lesson: apparently, things like copy/paste,
select all, etc. work only if they're present in the app's main toolbar.
By removing the storyboard, I removed the toolbar and thus broke this.
  • Loading branch information
temochka committed Feb 25, 2021
1 parent b81a8bf commit f5944e9
Show file tree
Hide file tree
Showing 6 changed files with 697 additions and 19 deletions.
10 changes: 6 additions & 4 deletions Anykey.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
C05B608725DF28F100B0CECC /* UserDefaults+AnykeySettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05B608625DF28F100B0CECC /* UserDefaults+AnykeySettings.swift */; };
C05B609025E5B21200B0CECC /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = C05B608F25E5B21200B0CECC /* README.md */; };
C05B609325E5B21B00B0CECC /* LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = C05B609225E5B21B00B0CECC /* LICENSE */; };
C05B609B25E5C78F00B0CECC /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05B609A25E5C78F00B0CECC /* main.swift */; };
C05B60C625E7043B00B0CECC /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C05B60C525E7043B00B0CECC /* Main.storyboard */; };
C0E3867125D1E60F006D9B7D /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0E3867025D1E60F006D9B7D /* AppDelegate.swift */; };
C0E3867325D1E60F006D9B7D /* PreferencesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0E3867225D1E60F006D9B7D /* PreferencesView.swift */; };
C0E3867525D1E611006D9B7D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C0E3867425D1E611006D9B7D /* Assets.xcassets */; };
Expand All @@ -28,7 +28,7 @@
C05B608625DF28F100B0CECC /* UserDefaults+AnykeySettings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UserDefaults+AnykeySettings.swift"; sourceTree = "<group>"; };
C05B608F25E5B21200B0CECC /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = SOURCE_ROOT; };
C05B609225E5B21B00B0CECC /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = SOURCE_ROOT; };
C05B609A25E5C78F00B0CECC /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = "<group>"; };
C05B60C525E7043B00B0CECC /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = "<group>"; };
C0E3866D25D1E60F006D9B7D /* Anykey.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Anykey.app; sourceTree = BUILT_PRODUCTS_DIR; };
C0E3867025D1E60F006D9B7D /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
C0E3867225D1E60F006D9B7D /* PreferencesView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PreferencesView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -86,7 +86,7 @@
C0E386AE25D4B17F006D9B7D /* HotkeyConfig.swift */,
C05B608125DDBC1200B0CECC /* Notifications.swift */,
C05B608625DF28F100B0CECC /* UserDefaults+AnykeySettings.swift */,
C05B609A25E5C78F00B0CECC /* main.swift */,
C05B60C525E7043B00B0CECC /* Main.storyboard */,
);
path = Anykey;
sourceTree = "<group>";
Expand Down Expand Up @@ -165,6 +165,7 @@
buildActionMask = 2147483647;
files = (
C0E3867825D1E611006D9B7D /* Preview Assets.xcassets in Resources */,
C05B60C625E7043B00B0CECC /* Main.storyboard in Resources */,
C05B609025E5B21200B0CECC /* README.md in Resources */,
C0E3867525D1E611006D9B7D /* Assets.xcassets in Resources */,
C05B609325E5B21B00B0CECC /* LICENSE in Resources */,
Expand All @@ -180,7 +181,6 @@
files = (
C0E386A425D33AF4006D9B7D /* Key.swift in Sources */,
C05B608225DDBC1200B0CECC /* Notifications.swift in Sources */,
C05B609B25E5C78F00B0CECC /* main.swift in Sources */,
C0E386AA25D468F3006D9B7D /* HotkeyListener.swift in Sources */,
C0E3867325D1E60F006D9B7D /* PreferencesView.swift in Sources */,
C05B608725DF28F100B0CECC /* UserDefaults+AnykeySettings.swift in Sources */,
Expand Down Expand Up @@ -324,6 +324,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 1.1;
PRODUCT_BUNDLE_IDENTIFIER = com.temochka.Anykey;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand All @@ -347,6 +348,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 1.1;
PRODUCT_BUNDLE_IDENTIFIER = com.temochka.Anykey;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand Down
1 change: 1 addition & 0 deletions Anykey/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import OSLog
import ShellOut
import SwiftUI

@main
class AppDelegate: NSObject, NSApplicationDelegate {
private var preferencesWindow: NSWindow!
private var statusItem: NSStatusItem?
Expand Down
6 changes: 5 additions & 1 deletion Anykey/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSApplicationCategoryType</key>
Expand All @@ -26,7 +26,11 @@
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>LSUIElement</key>
<true/>
<key>NSMainStoryboardFile</key>
<string>Main</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
</dict>
</plist>
Loading

0 comments on commit f5944e9

Please sign in to comment.