Skip to content

Commit 80d9222

Browse files
committed
Migrate to Xcode 16 and drop macOS 13 (#1)
1 parent 204bccc commit 80d9222

File tree

10 files changed

+19
-50
lines changed

10 files changed

+19
-50
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ jobs:
1111
textgrabber2:
1212
name: TextGrabber2
1313
runs-on: macos-14
14+
if: github.event.pull_request.draft == false
1415
env:
15-
DEVELOPER_DIR: /Applications/Xcode_15.4.app/Contents/Developer
16+
DEVELOPER_DIR: /Applications/Xcode_16.0.app/Contents/Developer
1617

1718
steps:
1819
- uses: actions/checkout@v4

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# TextGrabber2
44

5-
[![](https://img.shields.io/badge/Platform-macOS_13.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)
5+
[![](https://img.shields.io/badge/Platform-macOS_14.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)
66

77
TextGrabber2 is a free and **open-source** macOS menu bar app that efficiently detects text from copied images. This eliminates the need to save images as files and then delete them solely for the purpose of text detection.
88

@@ -13,7 +13,7 @@ For example, press `Control-Shift-Command-4` to capture a portion of the screen
1313
It also functions effectively for any form of image copying.
1414

1515
> Note that keyboard shortcuts can be remapped (and it's recommended since pressing 4 keys is a bit clunky). Please check out Apple's [documentation](https://support.apple.com/guide/mac-help/mchlp2271/mac) for details.
16-
>
16+
>
1717
> Learn more [here](https://github.com/TextGrabber2-app/TextGrabber2/wiki#capture-screen-on-mac).
1818
1919
## Installation
@@ -44,4 +44,4 @@ Here's the thing, there was a discontinued app called TextGrabber that I used a
4444

4545
When initiating this project, I couldn't think of a better name than TextGrabber, so I decided to name it:
4646

47-
**TextGrabber** *"too"*.
47+
**TextGrabber** *"too"*.

TextGrabber2.xcodeproj/project.pbxproj

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99
/* Begin PBXBuildFile section */
1010
8737A24A2BBEC27700042E83 /* Services in Resources */ = {isa = PBXBuildFile; fileRef = 8737A2492BBEC27700042E83 /* Services */; };
1111
8737A24C2BBECB8800042E83 /* Services.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8737A24B2BBECB8800042E83 /* Services.swift */; };
12-
874D776C2BCF6DF90093662D /* Unchecked.swift in Sources */ = {isa = PBXBuildFile; fileRef = 874D776B2BCF6DF90093662D /* Unchecked.swift */; };
1312
875364A42BE1D6FC00611579 /* NSAlert+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 875364A32BE1D6FC00611579 /* NSAlert+Extension.swift */; };
14-
875364A62BE1D7A000611579 /* NSApplication+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 875364A52BE1D7A000611579 /* NSApplication+Extension.swift */; };
1513
8772FAE92BAC743D00DBEAA0 /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = 8772FAE82BAC743D00DBEAA0 /* Localizable.xcstrings */; };
1614
87E192C32BAADE1200A87A4E /* App.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87E192C22BAADE1200A87A4E /* App.swift */; };
1715
87E192C72BAADE1300A87A4E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 87E192C62BAADE1300A87A4E /* Assets.xcassets */; };
@@ -35,9 +33,7 @@
3533
/* Begin PBXFileReference section */
3634
8737A2492BBEC27700042E83 /* Services */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Services; sourceTree = "<group>"; };
3735
8737A24B2BBECB8800042E83 /* Services.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Services.swift; sourceTree = "<group>"; };
38-
874D776B2BCF6DF90093662D /* Unchecked.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Unchecked.swift; sourceTree = "<group>"; };
3936
875364A32BE1D6FC00611579 /* NSAlert+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSAlert+Extension.swift"; sourceTree = "<group>"; };
40-
875364A52BE1D7A000611579 /* NSApplication+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSApplication+Extension.swift"; sourceTree = "<group>"; };
4137
8772FAE82BAC743D00DBEAA0 /* Localizable.xcstrings */ = {isa = PBXFileReference; lastKnownFileType = text.json.xcstrings; path = Localizable.xcstrings; sourceTree = "<group>"; };
4238
87E192BF2BAADE1200A87A4E /* TextGrabber2.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TextGrabber2.app; sourceTree = BUILT_PRODUCTS_DIR; };
4339
87E192C22BAADE1200A87A4E /* App.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = App.swift; sourceTree = "<group>"; };
@@ -123,7 +119,6 @@
123119
children = (
124120
87E192D42BAAE12600A87A4E /* Bundle+Extension.swift */,
125121
875364A32BE1D6FC00611579 /* NSAlert+Extension.swift */,
126-
875364A52BE1D7A000611579 /* NSApplication+Extension.swift */,
127122
87E192DC2BAAE38700A87A4E /* NSControl+Extension.swift */,
128123
87E192D92BAAE25500A87A4E /* NSImage+Extension.swift */,
129124
87E192DD2BAAE38700A87A4E /* NSMenu+Extension.swift */,
@@ -147,7 +142,6 @@
147142
87E192F02BABB6EA00A87A4E /* Recognizer.swift */,
148143
87E192E82BAAFF0200A87A4E /* Resources.swift */,
149144
8737A24B2BBECB8800042E83 /* Services.swift */,
150-
874D776B2BCF6DF90093662D /* Unchecked.swift */,
151145
);
152146
path = Sources;
153147
sourceTree = "<group>";
@@ -180,7 +174,7 @@
180174
attributes = {
181175
BuildIndependentTargetsInParallel = 1;
182176
LastSwiftUpdateCheck = 1530;
183-
LastUpgradeCheck = 1530;
177+
LastUpgradeCheck = 1600;
184178
TargetAttributes = {
185179
87E192BE2BAADE1200A87A4E = {
186180
CreatedOnToolsVersion = 15.3;
@@ -234,15 +228,13 @@
234228
87E192FD2BAC1BD600A87A4E /* NSWindow+Extension.swift in Sources */,
235229
87E192D52BAAE12600A87A4E /* Bundle+Extension.swift in Sources */,
236230
87E192FB2BAC044E00A87A4E /* NSObject+Extension.swift in Sources */,
237-
874D776C2BCF6DF90093662D /* Unchecked.swift in Sources */,
238231
87E192DE2BAAE38700A87A4E /* NSMenuItem+Extension.swift in Sources */,
239232
87E192E52BAAFB1800A87A4E /* NSWorkspace+Extension.swift in Sources */,
240233
87E192D82BAAE17200A87A4E /* main.swift in Sources */,
241234
87E192DA2BAAE25500A87A4E /* NSImage+Extension.swift in Sources */,
242235
87E192F52BABC8FD00A87A4E /* Detector.swift in Sources */,
243236
87E192E02BAAE38700A87A4E /* NSMenu+Extension.swift in Sources */,
244237
87E192F72BABD18900A87A4E /* Logger.swift in Sources */,
245-
875364A62BE1D7A000611579 /* NSApplication+Extension.swift in Sources */,
246238
87E192C32BAADE1200A87A4E /* App.swift in Sources */,
247239
87E192E92BAAFF0200A87A4E /* Resources.swift in Sources */,
248240
);
@@ -257,6 +249,7 @@
257249
buildSettings = {
258250
ALWAYS_SEARCH_USER_PATHS = NO;
259251
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
252+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
260253
CLANG_ANALYZER_NONNULL = YES;
261254
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
262255
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
@@ -286,6 +279,7 @@
286279
CLANG_WARN_UNREACHABLE_CODE = YES;
287280
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
288281
COPY_PHASE_STRIP = NO;
282+
DEAD_CODE_STRIPPING = YES;
289283
DEBUG_INFORMATION_FORMAT = dwarf;
290284
ENABLE_STRICT_OBJC_MSGSEND = YES;
291285
ENABLE_TESTABILITY = YES;
@@ -306,7 +300,7 @@
306300
GCC_WARN_UNUSED_FUNCTION = YES;
307301
GCC_WARN_UNUSED_VARIABLE = YES;
308302
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
309-
MACOSX_DEPLOYMENT_TARGET = 13.0;
303+
MACOSX_DEPLOYMENT_TARGET = 14.0;
310304
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
311305
MTL_FAST_MATH = YES;
312306
ONLY_ACTIVE_ARCH = YES;
@@ -324,6 +318,7 @@
324318
buildSettings = {
325319
ALWAYS_SEARCH_USER_PATHS = NO;
326320
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
321+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
327322
CLANG_ANALYZER_NONNULL = YES;
328323
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
329324
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
@@ -353,6 +348,7 @@
353348
CLANG_WARN_UNREACHABLE_CODE = YES;
354349
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
355350
COPY_PHASE_STRIP = NO;
351+
DEAD_CODE_STRIPPING = YES;
356352
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
357353
ENABLE_NS_ASSERTIONS = NO;
358354
ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -367,7 +363,7 @@
367363
GCC_WARN_UNUSED_FUNCTION = YES;
368364
GCC_WARN_UNUSED_VARIABLE = YES;
369365
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
370-
MACOSX_DEPLOYMENT_TARGET = 13.0;
366+
MACOSX_DEPLOYMENT_TARGET = 14.0;
371367
MTL_ENABLE_DEBUG_INFO = NO;
372368
MTL_FAST_MATH = YES;
373369
SDKROOT = macosx;
@@ -388,6 +384,7 @@
388384
CODE_SIGN_STYLE = Automatic;
389385
COMBINE_HIDPI_IMAGES = YES;
390386
CURRENT_PROJECT_VERSION = "$(inherited)";
387+
DEAD_CODE_STRIPPING = YES;
391388
DEVELOPMENT_TEAM = "$(inherited)";
392389
ENABLE_HARDENED_RUNTIME = YES;
393390
GENERATE_INFOPLIST_FILE = YES;
@@ -419,6 +416,7 @@
419416
CODE_SIGN_STYLE = Automatic;
420417
COMBINE_HIDPI_IMAGES = YES;
421418
CURRENT_PROJECT_VERSION = "$(inherited)";
419+
DEAD_CODE_STRIPPING = YES;
422420
DEVELOPMENT_TEAM = "$(inherited)";
423421
ENABLE_HARDENED_RUNTIME = YES;
424422
GENERATE_INFOPLIST_FILE = YES;

TextGrabber2.xcodeproj/xcshareddata/xcschemes/TextGrabber2 (en).xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1530"
3+
LastUpgradeVersion = "1600"
44
version = "1.7">
55
<BuildAction
66
parallelizeBuildables = "YES"

TextGrabber2.xcodeproj/xcshareddata/xcschemes/TextGrabber2 (zh-Hans).xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1530"
3+
LastUpgradeVersion = "1600"
44
version = "1.7">
55
<BuildAction
66
parallelizeBuildables = "YES"

TextGrabber2.xcodeproj/xcshareddata/xcschemes/TextGrabber2.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1530"
3+
LastUpgradeVersion = "1600"
44
version = "1.7">
55
<BuildAction
66
parallelizeBuildables = "YES"

TextGrabber2/Sources/Extensions/NSAlert+Extension.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import AppKit
99

1010
extension NSAlert {
1111
static func runModal(message: String, style: Style = .critical) {
12-
NSApp.tryToActivate()
12+
NSApp.activate()
1313

1414
let alert = Self()
1515
alert.alertStyle = style

TextGrabber2/Sources/Extensions/NSApplication+Extension.swift

Lines changed: 0 additions & 18 deletions
This file was deleted.

TextGrabber2/Sources/Extensions/NSPasteboard+Extension.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ extension NSPasteboard {
4545

4646
@MainActor
4747
func saveImageAsFile() {
48-
NSApp.tryToActivate()
48+
NSApp.activate()
4949

5050
let savePanel = NSSavePanel()
5151
savePanel.allowedContentTypes = [.png]

TextGrabber2/Sources/Unchecked.swift

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)