From f7153f91dbb5e1f573f6bfedf7c773c0e95392fa Mon Sep 17 00:00:00 2001 From: Ying Zhong <0x00eeee@gmail.com> Date: Mon, 14 Sep 2026 11:00:31 +0800 Subject: [PATCH] Bump minimum target to macOS 26 --- .github/workflows/build.yml | 6 ++---- BuildTools/Package.swift | 2 +- README.md | 4 ++-- TextGrabber2.xcodeproj/project.pbxproj | 6 +++--- .../xcschemes/TextGrabber2 (en).xcscheme | 2 +- .../xcschemes/TextGrabber2 (zh-Hans).xcscheme | 2 +- .../xcshareddata/xcschemes/TextGrabber2.xcscheme | 2 +- TextGrabber2/Sources/App/App+Detection.swift | 9 +-------- .../Sources/Extensions/NSMenuItem+Extension.swift | 12 ------------ .../Sources/Extensions/NSPasteboard+Extension.swift | 6 +----- 10 files changed, 13 insertions(+), 38 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fd5be9a..d6abce0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,13 +10,11 @@ on: jobs: textgrabber2: name: TextGrabber2 - runs-on: macos-26 + runs-on: xcode-27 if: github.event.pull_request.draft == false - env: - DEVELOPER_DIR: /Applications/Xcode_26.6.app/Contents/Developer steps: - uses: actions/checkout@v5 - name: Build TextGrabber2 run: | - xcodebuild build -scheme TextGrabber2 -destination 'platform=macOS' CODE_SIGN_IDENTITY="" CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO + xcodebuild build -scheme TextGrabber2 -destination 'generic/platform=macOS' CODE_SIGN_IDENTITY="" CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO diff --git a/BuildTools/Package.swift b/BuildTools/Package.swift index 21fd7c1..85423f9 100644 --- a/BuildTools/Package.swift +++ b/BuildTools/Package.swift @@ -6,7 +6,7 @@ import PackageDescription let package = Package( name: "BuildTools", platforms: [ - .macOS(.v15), + .macOS("26.0"), ], products: [ .plugin(name: "SwiftLint", targets: ["SwiftLint"]), diff --git a/README.md b/README.md index 7c0b563..5aaaeed 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ # TextGrabber2 -[![](https://img.shields.io/badge/Platform-macOS_15.0+-blue?color=007bff)](https://github.com/TextGrabber2-app/TextGrabber2/releases/latest) [![](https://github.com/TextGrabber2-app/TextGrabber2/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/TextGrabber2-app/TextGrabber2/actions/workflows/build.yml) +[![](https://img.shields.io/badge/Platform-macOS_26.0+-blue?color=007bff)](https://github.com/TextGrabber2-app/TextGrabber2/releases/latest) [![](https://github.com/TextGrabber2-app/TextGrabber2/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/TextGrabber2-app/TextGrabber2/actions/workflows/build.yml) TextGrabber2 is a free and **open-source** “Copy-to-Action” tool that lets you [extract text](https://github.com/TextGrabber2-app/TextGrabber2/wiki#capture-screen-on-mac) from copied images and seamlessly [run actions](https://github.com/TextGrabber2-app/TextGrabber2/wiki#connect-to-system-services). @@ -30,7 +30,7 @@ See the [wiki](https://github.com/TextGrabber2-app/TextGrabber2/wiki) for more d > [!NOTE] > -> For information on clipboard access issues in macOS 15.4 and later, please refer to our [wiki](https://github.com/TextGrabber2-app/TextGrabber2/wiki#limited-access). +> For information on clipboard access restrictions, please refer to our [wiki](https://github.com/TextGrabber2-app/TextGrabber2/wiki#limited-access). ## Installation diff --git a/TextGrabber2.xcodeproj/project.pbxproj b/TextGrabber2.xcodeproj/project.pbxproj index ad2aad4..995ab64 100644 --- a/TextGrabber2.xcodeproj/project.pbxproj +++ b/TextGrabber2.xcodeproj/project.pbxproj @@ -124,7 +124,7 @@ attributes = { BuildIndependentTargetsInParallel = 1; LastSwiftUpdateCheck = 1530; - LastUpgradeCheck = 2620; + LastUpgradeCheck = 2700; TargetAttributes = { 87E192BE2BAADE1200A87A4E = { CreatedOnToolsVersion = 15.3; @@ -242,7 +242,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MACOSX_DEPLOYMENT_TARGET = 15.0; + MACOSX_DEPLOYMENT_TARGET = 26.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -307,7 +307,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MACOSX_DEPLOYMENT_TARGET = 15.0; + MACOSX_DEPLOYMENT_TARGET = 26.0; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; SDKROOT = macosx; diff --git a/TextGrabber2.xcodeproj/xcshareddata/xcschemes/TextGrabber2 (en).xcscheme b/TextGrabber2.xcodeproj/xcshareddata/xcschemes/TextGrabber2 (en).xcscheme index a391234..37388f5 100644 --- a/TextGrabber2.xcodeproj/xcshareddata/xcschemes/TextGrabber2 (en).xcscheme +++ b/TextGrabber2.xcodeproj/xcshareddata/xcschemes/TextGrabber2 (en).xcscheme @@ -1,6 +1,6 @@ Void).self - )(self, selector, 1) // .visible - } else { - assertionFailure("Missing setPreferredImageVisibility:") - } - #endif } @MainActor diff --git a/TextGrabber2/Sources/Extensions/NSPasteboard+Extension.swift b/TextGrabber2/Sources/Extensions/NSPasteboard+Extension.swift index 4622aa3..7704ee7 100644 --- a/TextGrabber2/Sources/Extensions/NSPasteboard+Extension.swift +++ b/TextGrabber2/Sources/Extensions/NSPasteboard+Extension.swift @@ -44,11 +44,7 @@ extension NSPasteboard { } var hasLimitedAccess: Bool { - guard #available(macOS 15.4, *) else { - return false - } - - return accessBehavior != .alwaysAllow + accessBehavior != .alwaysAllow } var hasFullAccess: Bool {