Skip to content

Commit 5e6fa31

Browse files
bug fix #7
1 parent 5d6b24f commit 5e6fa31

File tree

3 files changed

+11
-27
lines changed

3 files changed

+11
-27
lines changed

IconChanger.xcodeproj/project.pbxproj

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@
381381
CODE_SIGN_IDENTITY = "Apple Development";
382382
CODE_SIGN_STYLE = Automatic;
383383
COMBINE_HIDPI_IMAGES = YES;
384-
CURRENT_PROJECT_VERSION = 12;
384+
CURRENT_PROJECT_VERSION = 13;
385385
DEAD_CODE_STRIPPING = YES;
386386
DEVELOPMENT_ASSET_PATHS = "\"IconChanger/Preview Content\"";
387387
DEVELOPMENT_TEAM = 44BN78992X;
@@ -395,8 +395,8 @@
395395
"$(inherited)",
396396
"@executable_path/../Frameworks",
397397
);
398-
MACOSX_DEPLOYMENT_TARGET = 12.0;
399-
MARKETING_VERSION = 1.2.3;
398+
MACOSX_DEPLOYMENT_TARGET = 13.0;
399+
MARKETING_VERSION = 1.2.4;
400400
PRODUCT_BUNDLE_IDENTIFIER = com.zhuhaoyu.IconChanger;
401401
PRODUCT_NAME = "$(TARGET_NAME)";
402402
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -414,7 +414,7 @@
414414
CODE_SIGN_IDENTITY = "Apple Development";
415415
CODE_SIGN_STYLE = Automatic;
416416
COMBINE_HIDPI_IMAGES = YES;
417-
CURRENT_PROJECT_VERSION = 12;
417+
CURRENT_PROJECT_VERSION = 13;
418418
DEAD_CODE_STRIPPING = YES;
419419
DEVELOPMENT_ASSET_PATHS = "\"IconChanger/Preview Content\"";
420420
DEVELOPMENT_TEAM = 44BN78992X;
@@ -428,8 +428,8 @@
428428
"$(inherited)",
429429
"@executable_path/../Frameworks",
430430
);
431-
MACOSX_DEPLOYMENT_TARGET = 12.0;
432-
MARKETING_VERSION = 1.2.3;
431+
MACOSX_DEPLOYMENT_TARGET = 13.0;
432+
MARKETING_VERSION = 1.2.4;
433433
PRODUCT_BUNDLE_IDENTIFIER = com.zhuhaoyu.IconChanger;
434434
PRODUCT_NAME = "$(TARGET_NAME)";
435435
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -483,7 +483,7 @@
483483
repositoryURL = "https://github.com/underthestars-zhy/LaunchPadManagerDBHelper";
484484
requirement = {
485485
kind = upToNextMinorVersion;
486-
minimumVersion = 1.0.8;
486+
minimumVersion = 1.0.9;
487487
};
488488
};
489489
/* End XCRemoteSwiftPackageReference section */

IconChanger/IconManager.swift

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,7 @@ class IconManager: ObservableObject {
9696
let copy = content
9797

9898
for (key, value) in replacement {
99-
if #available(macOS 13.0, *) {
100-
content.replace("%\(key)", with: value)
101-
} else {
102-
content = content.replace(target: "%\(key)", withString: value)
103-
}
99+
content = content.replace(target: "%\(key)", withString: value)
104100
}
105101

106102
try content.write(to: path, atomically: true, encoding: .utf8)

IconChanger/URL+Universal.swift

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,14 @@ import Foundation
99

1010
extension URL {
1111
func universalappending(path: String) -> Self {
12-
if #available(macOS 13, *) {
13-
return self.appending(component: path)
14-
} else {
15-
return self.appendingPathComponent(path)
16-
}
12+
return self.appendingPathComponent(path)
1713
}
1814

1915
func universalPath() -> String {
20-
if #available(macOS 13, *) {
21-
return self.path().removingPercentEncoding ?? self.path()
22-
} else {
23-
return self.path.removingPercentEncoding ?? self.path
24-
}
16+
return self.path.removingPercentEncoding ?? self.path
2517
}
2618

2719
init(universalFilePath: String) {
28-
if #available(macOS 13, *) {
29-
self.init(filePath: universalFilePath)
30-
} else {
31-
self.init(fileURLWithPath: universalFilePath)
32-
}
20+
self.init(fileURLWithPath: universalFilePath)
3321
}
3422
}

0 commit comments

Comments
 (0)