Skip to content

Commit 0e86cf6

Browse files
committed
Fix compatibility with Xcode 14.1
1 parent 2dca4a0 commit 0e86cf6

File tree

6 files changed

+22
-13
lines changed

6 files changed

+22
-13
lines changed

CircularProgress.xcodeproj/project.pbxproj

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@
198198
isa = PBXProject;
199199
attributes = {
200200
LastSwiftUpdateCheck = 0940;
201-
LastUpgradeCheck = 1200;
201+
LastUpgradeCheck = 1410;
202202
TargetAttributes = {
203203
"CircularProgress::CircularProgress" = {
204204
LastSwiftMigration = 1020;
@@ -243,6 +243,7 @@
243243
/* Begin PBXShellScriptBuildPhase section */
244244
E3BFC67721FBBB2700C16B1A /* SwiftLint */ = {
245245
isa = PBXShellScriptBuildPhase;
246+
alwaysOutOfDate = 1;
246247
buildActionMask = 2147483647;
247248
files = (
248249
);
@@ -334,6 +335,7 @@
334335
CODE_SIGN_STYLE = Automatic;
335336
COMBINE_HIDPI_IMAGES = YES;
336337
CURRENT_PROJECT_VERSION = 1;
338+
DEAD_CODE_STRIPPING = YES;
337339
DEVELOPMENT_TEAM = "";
338340
GCC_C_LANGUAGE_STANDARD = gnu11;
339341
GCC_DYNAMIC_NO_PIC = NO;
@@ -378,6 +380,7 @@
378380
COMBINE_HIDPI_IMAGES = YES;
379381
COPY_PHASE_STRIP = NO;
380382
CURRENT_PROJECT_VERSION = 1;
383+
DEAD_CODE_STRIPPING = YES;
381384
DEVELOPMENT_TEAM = "";
382385
ENABLE_NS_ASSERTIONS = NO;
383386
GCC_C_LANGUAGE_STANDARD = gnu11;
@@ -403,6 +406,7 @@
403406
APPLICATION_EXTENSION_API_ONLY = YES;
404407
CODE_SIGN_IDENTITY = "";
405408
CODE_SIGN_STYLE = Automatic;
409+
DEAD_CODE_STRIPPING = YES;
406410
DEVELOPMENT_TEAM = "";
407411
ENABLE_TESTABILITY = YES;
408412
FRAMEWORK_SEARCH_PATHS = (
@@ -431,6 +435,7 @@
431435
APPLICATION_EXTENSION_API_ONLY = YES;
432436
CODE_SIGN_IDENTITY = "";
433437
CODE_SIGN_STYLE = Automatic;
438+
DEAD_CODE_STRIPPING = YES;
434439
DEVELOPMENT_TEAM = "";
435440
ENABLE_TESTABILITY = YES;
436441
FRAMEWORK_SEARCH_PATHS = (
@@ -458,6 +463,7 @@
458463
buildSettings = {
459464
CODE_SIGN_IDENTITY = "";
460465
CODE_SIGN_STYLE = Manual;
466+
DEAD_CODE_STRIPPING = YES;
461467
DEVELOPMENT_TEAM = "";
462468
LD = /usr/bin/true;
463469
OTHER_SWIFT_FLAGS = "-swift-version 4 -I $(TOOLCHAIN_DIR)/usr/lib/swift/pm/4 -target x86_64-apple-macosx10.10 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk";
@@ -472,6 +478,7 @@
472478
buildSettings = {
473479
CODE_SIGN_IDENTITY = "";
474480
CODE_SIGN_STYLE = Manual;
481+
DEAD_CODE_STRIPPING = YES;
475482
DEVELOPMENT_TEAM = "";
476483
LD = /usr/bin/true;
477484
OTHER_SWIFT_FLAGS = "-swift-version 4 -I $(TOOLCHAIN_DIR)/usr/lib/swift/pm/4 -target x86_64-apple-macosx10.10 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk";
@@ -505,6 +512,7 @@
505512
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
506513
COMBINE_HIDPI_IMAGES = YES;
507514
COPY_PHASE_STRIP = NO;
515+
DEAD_CODE_STRIPPING = YES;
508516
DEBUG_INFORMATION_FORMAT = dwarf;
509517
DYLIB_INSTALL_NAME_BASE = "@rpath";
510518
ENABLE_NS_ASSERTIONS = YES;
@@ -555,6 +563,7 @@
555563
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
556564
COMBINE_HIDPI_IMAGES = YES;
557565
COPY_PHASE_STRIP = YES;
566+
DEAD_CODE_STRIPPING = YES;
558567
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
559568
DYLIB_INSTALL_NAME_BASE = "@rpath";
560569
ENABLE_STRICT_OBJC_MSGSEND = YES;

CircularProgress.xcodeproj/xcshareddata/xcschemes/CircularProgress-Package.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 = "1200"
3+
LastUpgradeVersion = "1410"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

CircularProgress.xcodeproj/xcshareddata/xcschemes/CircularProgressExample.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 = "1200"
3+
LastUpgradeVersion = "1410"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

CircularProgress.xcodeproj/xcshareddata/xcschemes/CircularProgressPackageDescription.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 = "1200"
3+
LastUpgradeVersion = "1410"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.6
1+
// swift-tools-version:5.7
22
import PackageDescription
33

44
let package = Package(

Sources/CircularProgress/CircularProgress.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ public final class CircularProgress: NSView {
154154
didSet {
155155
// TODO: Use `AsyncStream` for all these listeners.
156156
if let progressInstance {
157-
progressObserver = progressInstance.observe(\.fractionCompleted) { [weak self] sender, _ in
158-
DispatchQueue.main.async {
157+
progressObserver = progressInstance.observe(\.fractionCompleted) { sender, _ in
158+
Task { @MainActor [weak self] in
159159
guard
160160
let self,
161161
!self.isCancelled,
@@ -168,8 +168,8 @@ public final class CircularProgress: NSView {
168168
}
169169
}
170170

171-
finishedObserver = progressInstance.observe(\.isFinished) { [weak self] sender, _ in
172-
DispatchQueue.main.async {
171+
finishedObserver = progressInstance.observe(\.isFinished) { sender, _ in
172+
Task { @MainActor [weak self] in
173173
guard
174174
let self,
175175
!self.isCancelled,
@@ -182,8 +182,8 @@ public final class CircularProgress: NSView {
182182
}
183183
}
184184

185-
cancelledObserver = progressInstance.observe(\.isCancelled) { [weak self] sender, _ in
186-
DispatchQueue.main.async {
185+
cancelledObserver = progressInstance.observe(\.isCancelled) { sender, _ in
186+
Task { @MainActor [weak self] in
187187
guard let self else {
188188
return
189189
}
@@ -192,8 +192,8 @@ public final class CircularProgress: NSView {
192192
}
193193
}
194194

195-
indeterminateObserver = progressInstance.observe(\.isIndeterminate) { [weak self] sender, _ in
196-
DispatchQueue.main.async {
195+
indeterminateObserver = progressInstance.observe(\.isIndeterminate) { sender, _ in
196+
Task { @MainActor [weak self] in
197197
guard let self else {
198198
return
199199
}

0 commit comments

Comments
 (0)