From b2644612f3dbba6582115a39f7588c22df6f5463 Mon Sep 17 00:00:00 2001 From: Lumaa Date: Thu, 15 Aug 2024 03:59:10 +0200 Subject: [PATCH] Fix build error --- Threaded.xcodeproj/project.pbxproj | 14 ++++++++------ Threaded/Views/Settings/IconView.swift | 3 ++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Threaded.xcodeproj/project.pbxproj b/Threaded.xcodeproj/project.pbxproj index 53542fb..9d56792 100644 --- a/Threaded.xcodeproj/project.pbxproj +++ b/Threaded.xcodeproj/project.pbxproj @@ -1049,7 +1049,7 @@ ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground; CODE_SIGN_ENTITLEMENTS = ThreadedWidgets/ThreadedWidgetsExtension.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 213; DEVELOPMENT_TEAM = HB5P3BML86; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = ThreadedWidgets/Info.plist; @@ -1069,6 +1069,7 @@ SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = WIDGET; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 1; @@ -1083,7 +1084,7 @@ ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground; CODE_SIGN_ENTITLEMENTS = ThreadedWidgets/ThreadedWidgetsExtension.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 213; DEVELOPMENT_TEAM = HB5P3BML86; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = ThreadedWidgets/Info.plist; @@ -1103,6 +1104,7 @@ SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = WIDGET; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 1; @@ -1245,7 +1247,7 @@ ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES; CODE_SIGN_ENTITLEMENTS = Threaded/Threaded.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 5; + CURRENT_PROJECT_VERSION = 213; DEVELOPMENT_ASSET_PATHS = "\"Threaded/Preview Content\""; DEVELOPMENT_TEAM = HB5P3BML86; ENABLE_PREVIEWS = YES; @@ -1287,7 +1289,7 @@ ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES; CODE_SIGN_ENTITLEMENTS = Threaded/Threaded.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 5; + CURRENT_PROJECT_VERSION = 213; DEVELOPMENT_ASSET_PATHS = "\"Threaded/Preview Content\""; DEVELOPMENT_TEAM = HB5P3BML86; ENABLE_PREVIEWS = YES; @@ -1323,7 +1325,7 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 213; DEVELOPMENT_TEAM = HB5P3BML86; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = AuthService/Info.plist; @@ -1353,7 +1355,7 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 213; DEVELOPMENT_TEAM = HB5P3BML86; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = AuthService/Info.plist; diff --git a/Threaded/Views/Settings/IconView.swift b/Threaded/Views/Settings/IconView.swift index eb5701c..4d57d19 100644 --- a/Threaded/Views/Settings/IconView.swift +++ b/Threaded/Views/Settings/IconView.swift @@ -31,7 +31,7 @@ struct IconView: View { .listThreaded() } - #if NS_EXTENSION_UNAVAILABLE + #if !WIDGET private func changeAppIcon(to iconName: String) { UIApplication.shared.setAlternateIconName(iconName) { error in if let error = error { @@ -41,6 +41,7 @@ struct IconView: View { } } #endif + } private enum AppIcons: CaseIterable {