Skip to content

Commit 8eb744b

Browse files
bug fix of in app icon
1 parent 898be12 commit 8eb744b

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

IconChanger.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@
345345
CODE_SIGN_IDENTITY = "Apple Development";
346346
CODE_SIGN_STYLE = Automatic;
347347
COMBINE_HIDPI_IMAGES = YES;
348-
CURRENT_PROJECT_VERSION = 7;
348+
CURRENT_PROJECT_VERSION = 8;
349349
DEAD_CODE_STRIPPING = YES;
350350
DEVELOPMENT_ASSET_PATHS = "\"IconChanger/Preview Content\"";
351351
DEVELOPMENT_TEAM = 44BN78992X;
@@ -377,7 +377,7 @@
377377
CODE_SIGN_IDENTITY = "Apple Development";
378378
CODE_SIGN_STYLE = Automatic;
379379
COMBINE_HIDPI_IMAGES = YES;
380-
CURRENT_PROJECT_VERSION = 7;
380+
CURRENT_PROJECT_VERSION = 8;
381381
DEAD_CODE_STRIPPING = YES;
382382
DEVELOPMENT_ASSET_PATHS = "\"IconChanger/Preview Content\"";
383383
DEVELOPMENT_TEAM = 44BN78992X;

IconChanger/AliasName.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ struct AliasName {
2323
}
2424

2525
static func getNames(for raw: String) -> String? {
26-
print(getNames())
2726
return getNames()[raw]
2827
}
2928

IconChanger/ChangeView.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ struct ChangeView: View {
6565
}
6666
}
6767
.frame(width: 500, height: 400)
68+
.onAppear {
69+
inIcons = iconManager.getIconInPath(setPath.url)
70+
}
6871
.task {
6972
do {
7073
icons = try await iconManager.getIcons(setPath)

IconChanger/IconManager.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ class IconManager: ObservableObject {
5353
}
5454
}
5555

56-
func getIconInPath(_ url: String) -> [URL] {
57-
let url = URL(fileURLWithPath: url).appendingPathComponent("Contents").appendingPathComponent("Resources")
56+
func getIconInPath(_ url: URL) -> [URL] {
57+
let url = url.appendingPathComponent("Contents").appendingPathComponent("Resources")
5858
let file = (try? FileManager.default.contentsOfDirectory(atPath: url.path)) ?? [String]()
5959
return file.filter {
6060
$0.contains(".icns")

0 commit comments

Comments
 (0)