From 8f0e9a7b9a1b295369dd75a08a1a1fdee92ad3e2 Mon Sep 17 00:00:00 2001 From: Yavuz Date: Sun, 28 Jun 2026 14:14:48 +0300 Subject: [PATCH 1/2] Fix compile errors by importing CoreGraphics --- Hummingbird/CGEvent+ext.swift | 1 + Hummingbird/Modifiers.swift | 1 + 2 files changed, 2 insertions(+) diff --git a/Hummingbird/CGEvent+ext.swift b/Hummingbird/CGEvent+ext.swift index 6d0a018..3377b24 100644 --- a/Hummingbird/CGEvent+ext.swift +++ b/Hummingbird/CGEvent+ext.swift @@ -7,6 +7,7 @@ // import Foundation +import CoreGraphics extension CGEvent { diff --git a/Hummingbird/Modifiers.swift b/Hummingbird/Modifiers.swift index acd702a..7212d72 100644 --- a/Hummingbird/Modifiers.swift +++ b/Hummingbird/Modifiers.swift @@ -7,6 +7,7 @@ // import Foundation +import CoreGraphics protocol Kind { From 01bd673e67c8908f8143026fa2797e54173f0504 Mon Sep 17 00:00:00 2001 From: Yavuz Date: Sun, 28 Jun 2026 14:28:30 +0300 Subject: [PATCH 2/2] Modernize project for recent macOS versions Raise deployment target to macOS 13, update System Settings copy and accessibility deep link, allow ad-hoc test signing for contributors, and add CI workflow for build and test. Co-authored-by: Cursor --- .github/workflows/ci.yml | 31 ++++++++++ Hummingbird.xcodeproj/project.pbxproj | 58 ++++++++----------- .../xcschemes/Hummingbird.xcscheme | 2 +- Hummingbird/AppDelegate.swift | 2 +- Hummingbird/Constants.swift | 4 +- Hummingbird/Functions.swift | 6 +- Hummingbird/Logging.swift | 18 +++--- readme.md | 6 +- 8 files changed, 75 insertions(+), 52 deletions(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..8b9d8de --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,31 @@ +name: CI + +on: + push: + branches: [develop] + pull_request: + branches: [develop] + +jobs: + build-and-test: + runs-on: macos-14 + steps: + - uses: actions/checkout@v4 + + - name: Build + run: | + xcodebuild \ + -scheme Hummingbird \ + -configuration OpenSource \ + build \ + CODE_SIGN_IDENTITY="-" \ + DEVELOPMENT_TEAM="" + + - name: Test + run: | + xcodebuild \ + -scheme Hummingbird \ + -configuration Test \ + test \ + CODE_SIGN_IDENTITY="-" \ + DEVELOPMENT_TEAM="" diff --git a/Hummingbird.xcodeproj/project.pbxproj b/Hummingbird.xcodeproj/project.pbxproj index a333626..edc4025 100644 --- a/Hummingbird.xcodeproj/project.pbxproj +++ b/Hummingbird.xcodeproj/project.pbxproj @@ -333,7 +333,7 @@ isa = PBXProject; attributes = { CLASSPREFIX = HB; - LastUpgradeCheck = 1200; + LastUpgradeCheck = 1600; ORGANIZATIONNAME = finestructure; TargetAttributes = { 65CF01611F229C34002259F2 = { @@ -545,7 +545,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 13.0; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; }; @@ -563,14 +563,14 @@ GCC_PREFIX_HEADER = "Hummingbird/Hummingbird-Prefix.pch"; INFOPLIST_FILE = "Hummingbird/Hummingbird-Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 13.0; MARKETING_VERSION = 3.3.0; PRODUCT_BUNDLE_IDENTIFIER = "co.finestructure.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = Hummingbird; SDKROOT = macosx; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG COMMERCIAL"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 5.9; WRAPPER_EXTENSION = app; }; name = Test; @@ -583,21 +583,19 @@ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_ENABLE_MODULES = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CODE_SIGN_IDENTITY = "Mac Developer"; + CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; DEBUG_INFORMATION_FORMAT = dwarf; - DEVELOPMENT_TEAM = A42K5AU657; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; INFOPLIST_FILE = HummingbirdTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = YES; PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "TEST COMMERCIAL"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 5.9; }; name = Test; }; @@ -645,7 +643,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 13.0; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; }; @@ -663,13 +661,13 @@ GCC_PREFIX_HEADER = "Hummingbird/Hummingbird-Prefix.pch"; INFOPLIST_FILE = "Hummingbird/Hummingbird-Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 13.0; MARKETING_VERSION = 3.3.0; PRODUCT_BUNDLE_IDENTIFIER = "co.finestructure.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = Hummingbird; SDKROOT = macosx; SWIFT_ACTIVE_COMPILATION_CONDITIONS = RELEASE; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 5.9; WRAPPER_EXTENSION = app; }; name = OpenSource; @@ -682,20 +680,18 @@ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_ENABLE_MODULES = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CODE_SIGN_IDENTITY = "Mac Developer"; + CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - DEVELOPMENT_TEAM = A42K5AU657; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; INFOPLIST_FILE = HummingbirdTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "RELEASE COMMERCIAL"; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 5.9; }; name = OpenSource; }; @@ -707,21 +703,19 @@ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_ENABLE_MODULES = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CODE_SIGN_IDENTITY = "Mac Developer"; + CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; DEBUG_INFORMATION_FORMAT = dwarf; - DEVELOPMENT_TEAM = A42K5AU657; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; INFOPLIST_FILE = HummingbirdTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = YES; PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG COMMERCIAL"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 5.9; }; name = Debug; }; @@ -733,20 +727,18 @@ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_ENABLE_MODULES = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CODE_SIGN_IDENTITY = "Mac Developer"; + CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - DEVELOPMENT_TEAM = A42K5AU657; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; INFOPLIST_FILE = HummingbirdTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "RELEASE COMMERCIAL"; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 5.9; }; name = Release; }; @@ -800,7 +792,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 13.0; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; }; @@ -850,7 +842,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 13.0; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; }; @@ -868,14 +860,14 @@ GCC_PREFIX_HEADER = "Hummingbird/Hummingbird-Prefix.pch"; INFOPLIST_FILE = "Hummingbird/Hummingbird-Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 13.0; MARKETING_VERSION = 3.3.0; PRODUCT_BUNDLE_IDENTIFIER = "co.finestructure.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = Hummingbird; SDKROOT = macosx; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG COMMERCIAL"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 5.9; WRAPPER_EXTENSION = app; }; name = Debug; @@ -892,13 +884,13 @@ GCC_PREFIX_HEADER = "Hummingbird/Hummingbird-Prefix.pch"; INFOPLIST_FILE = "Hummingbird/Hummingbird-Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 13.0; MARKETING_VERSION = 3.3.0; PRODUCT_BUNDLE_IDENTIFIER = "co.finestructure.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = Hummingbird; SDKROOT = macosx; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "RELEASE COMMERCIAL"; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 5.9; WRAPPER_EXTENSION = app; }; name = Release; diff --git a/Hummingbird.xcodeproj/xcshareddata/xcschemes/Hummingbird.xcscheme b/Hummingbird.xcodeproj/xcshareddata/xcschemes/Hummingbird.xcscheme index e0e9a7a..6844fe5 100644 --- a/Hummingbird.xcodeproj/xcshareddata/xcschemes/Hummingbird.xcscheme +++ b/Hummingbird.xcodeproj/xcshareddata/xcschemes/Hummingbird.xcscheme @@ -1,6 +1,6 @@ URL { URL(string: "https://gum.co/hb-tip-\(size.rawValue)?wanted=true")! diff --git a/Hummingbird/Functions.swift b/Hummingbird/Functions.swift index b85d5fb..d9beb4f 100644 --- a/Hummingbird/Functions.swift +++ b/Hummingbird/Functions.swift @@ -15,16 +15,16 @@ func showAccessibilityAlert() { alert.informativeText = """ Hummingbird requires Accessibility permissions in order to be able to move and resize windows for you. - You can grant Accessibility permissions in "System Preferences" → "Security & Privacy" → "Privacy" → "Accessibility". + You can grant Accessibility permissions in "System Settings" → "Privacy & Security" → "Accessibility". Click "Help" for more information. """ - alert.addButton(withTitle: "Open System Preferences") + alert.addButton(withTitle: "Open System Settings") alert.addButton(withTitle: "Help") switch alert.runModal() { case .alertFirstButtonReturn: - NSWorkspace.shared.open(Links.securitySystemPreferences) + NSWorkspace.shared.open(Links.accessibilitySettings) case .alertSecondButtonReturn: NSWorkspace.shared.open(Links.hummingbirdAccessibility) default: diff --git a/Hummingbird/Logging.swift b/Hummingbird/Logging.swift index 73b6086..ad42573 100644 --- a/Hummingbird/Logging.swift +++ b/Hummingbird/Logging.swift @@ -19,17 +19,15 @@ enum LogLevel: String { private func _log(_ level: LogLevel = .default, _ message: StaticString, _ args: CVarArg...) { - if #available(OSX 10.14, *) { - let type: OSLogType - switch level { - case .default: type = .default - case .debug: type = .debug - case .info: type = .info - case .error: type = .error - case .fault: type = .fault - } - os_log(type, message, args) + let type: OSLogType + switch level { + case .default: type = .default + case .debug: type = .debug + case .info: type = .info + case .error: type = .error + case .fault: type = .fault } + os_log(type, message, args) } diff --git a/readme.md b/readme.md index 34fdbd8..4d44876 100644 --- a/readme.md +++ b/readme.md @@ -22,7 +22,7 @@ brew tap finestructure/Hummingbird brew install finestructure/hummingbird/hummingbird ``` -Hummingbird has been tested on macOS 10.14 Mojave and 10.15 Catalina but it should run on earlier macOS versions as well (macOS 10.11 or higher). +Hummingbird requires macOS 13 (Ventura) or later. It has been tested on recent macOS releases including Apple Silicon Macs. ## Usage @@ -30,11 +30,11 @@ Hummingbird has been tested on macOS 10.14 Mojave and 10.15 Catalina but it shou -- However, on first use you will need to grant permissions for Accessibility Access. This is required so Hummingbird can move and resize windows. You will see an alert directing you to System Preferences: +- However, on first use you will need to grant permissions for Accessibility Access. This is required so Hummingbird can move and resize windows. You will see an alert directing you to System Settings: -- In System Preferences / Security & Privacy / Privacy, please authenticate and make sure the entry for "Hummingbird" under "Accessibility" is checked as indicated below. +- In System Settings → Privacy & Security → Accessibility, please authenticate and make sure the entry for "Hummingbird" under "Accessibility" is checked as indicated below.