From 1ec4df96790b6f6beb6997ff1c6f15151ad2d657 Mon Sep 17 00:00:00 2001 From: Daniel Chick Date: Wed, 24 Jan 2024 17:58:32 -0600 Subject: [PATCH 1/3] Enable generating swift symbols for the asset catalogs --- Swiftfin.xcodeproj/project.pbxproj | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Swiftfin.xcodeproj/project.pbxproj b/Swiftfin.xcodeproj/project.pbxproj index d037a604b..3bb49e474 100644 --- a/Swiftfin.xcodeproj/project.pbxproj +++ b/Swiftfin.xcodeproj/project.pbxproj @@ -2891,7 +2891,7 @@ New, ); LastSwiftUpdateCheck = 1250; - LastUpgradeCheck = 1430; + LastUpgradeCheck = 1520; TargetAttributes = { 5358705F2669D21600D05A09 = { CreatedOnToolsVersion = 12.5; @@ -3911,6 +3911,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; @@ -3975,6 +3976,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; From 4d717529548d739d594bececbeb6f524282a7782 Mon Sep 17 00:00:00 2001 From: Daniel Chick Date: Wed, 24 Jan 2024 17:59:10 -0600 Subject: [PATCH 2/3] Convert asset string names to Swift symbols --- Swiftfin tvOS/Views/BasicAppSettingsView.swift | 2 +- Swiftfin tvOS/Views/ServerListView.swift | 2 +- Swiftfin tvOS/Views/SettingsView/SettingsView.swift | 2 +- .../xcshareddata/xcschemes/Swiftfin tvOS.xcscheme | 2 +- Swiftfin.xcodeproj/xcshareddata/xcschemes/Swiftfin.xcscheme | 2 +- Swiftfin/Views/AboutAppView.swift | 2 +- .../Components/AboutView/Components/RatingsCard.swift | 4 ++-- Swiftfin/Views/LiveTVChannelItemWideElement.swift | 4 ++-- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Swiftfin tvOS/Views/BasicAppSettingsView.swift b/Swiftfin tvOS/Views/BasicAppSettingsView.swift index a31709497..0460540ed 100644 --- a/Swiftfin tvOS/Views/BasicAppSettingsView.swift +++ b/Swiftfin tvOS/Views/BasicAppSettingsView.swift @@ -26,7 +26,7 @@ struct BasicAppSettingsView: View { var body: some View { SplitFormWindowView() .descriptionView { - Image("jellyfin-blob-blue") + Image(.jellyfinBlobBlue) .resizable() .aspectRatio(contentMode: .fit) .frame(maxWidth: 400) diff --git a/Swiftfin tvOS/Views/ServerListView.swift b/Swiftfin tvOS/Views/ServerListView.swift index 2e5541576..37c085040 100644 --- a/Swiftfin tvOS/Views/ServerListView.swift +++ b/Swiftfin tvOS/Views/ServerListView.swift @@ -75,7 +75,7 @@ struct ServerListView: View { SplitFormWindowView() .descriptionView { VStack { - Image("jellyfin-blob-blue") + Image(.jellyfinBlobBlue) .resizable() .aspectRatio(contentMode: .fit) .frame(maxWidth: 400) diff --git a/Swiftfin tvOS/Views/SettingsView/SettingsView.swift b/Swiftfin tvOS/Views/SettingsView/SettingsView.swift index d9e6b7bb1..1c25df151 100644 --- a/Swiftfin tvOS/Views/SettingsView/SettingsView.swift +++ b/Swiftfin tvOS/Views/SettingsView/SettingsView.swift @@ -25,7 +25,7 @@ struct SettingsView: View { var body: some View { SplitFormWindowView() .descriptionView { - Image("jellyfin-blob-blue") + Image(.jellyfinBlobBlue) .resizable() .aspectRatio(contentMode: .fit) .frame(maxWidth: 400) diff --git a/Swiftfin.xcodeproj/xcshareddata/xcschemes/Swiftfin tvOS.xcscheme b/Swiftfin.xcodeproj/xcshareddata/xcschemes/Swiftfin tvOS.xcscheme index ba69d8c7b..ce949bc46 100644 --- a/Swiftfin.xcodeproj/xcshareddata/xcschemes/Swiftfin tvOS.xcscheme +++ b/Swiftfin.xcodeproj/xcshareddata/xcschemes/Swiftfin tvOS.xcscheme @@ -1,6 +1,6 @@ = 60 { - Image("tomato.fresh") + Image(.tomatoFresh) .symbolRenderingMode(.multicolor) .foregroundStyle(.green, .red) } else { - Image("tomato.rotten") + Image(.tomatoRotten) .symbolRenderingMode(.monochrome) .foregroundColor(.green) } diff --git a/Swiftfin/Views/LiveTVChannelItemWideElement.swift b/Swiftfin/Views/LiveTVChannelItemWideElement.swift index 43ee1de09..a7b5b4705 100644 --- a/Swiftfin/Views/LiveTVChannelItemWideElement.swift +++ b/Swiftfin/Views/LiveTVChannelItemWideElement.swift @@ -103,7 +103,7 @@ struct LiveTVChannelItemWideElement: View { programLabel( timeText: currentProgramText.timeDisplay, titleText: currentProgramText.title, - color: Color("TextHighlightColor") + color: Color(.textHighlight) ) if !nextProgramsText.isEmpty { let nextItem = nextProgramsText[0] @@ -132,7 +132,7 @@ struct LiveTVChannelItemWideElement: View { .background { RoundedRectangle(cornerRadius: 10, style: .continuous) .fill(Color("BackgroundColor")) - .shadow(color: Color("ShadowColor"), radius: 4, x: 0, y: 0) + .shadow(color: Color(.shadow), radius: 4, x: 0, y: 0) } } From 7b1028c60588966bf7ee8053a7d11ba00fa23dd7 Mon Sep 17 00:00:00 2001 From: Daniel Chick Date: Wed, 24 Jan 2024 22:23:44 -0600 Subject: [PATCH 3/3] Update contributing info for xcode 15 --- contributing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contributing.md b/contributing.md index 417c36edd..d3a4d58d8 100644 --- a/contributing.md +++ b/contributing.md @@ -6,7 +6,7 @@ ## Setup -Fork the Swiftfin repo and install the necessary dependencies with Xcode 14: +Fork the Swiftfin repo and install the necessary dependencies with Xcode 15: ```bash # install Carthage, SwiftFormat, and SwiftGen with homebrew