From 0e1bc026ed65282803fb3891c5d8dbcd6f64eb5e Mon Sep 17 00:00:00 2001 From: opficdev <162981733+opficdev@users.noreply.github.com> Date: Tue, 7 Jul 2026 11:15:06 +0900 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20Settings=20=EB=B2=A0=ED=83=80=20?= =?UTF-8?q?=EC=B0=B8=EC=97=AC=20=ED=95=AD=EB=AA=A9=20prod=20=EB=85=B8?= =?UTF-8?q?=EC=B6=9C=20=EC=A1=B0=EA=B1=B4=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sources/Settings/SettingsFeature.swift | 17 ++++++++++++++- .../Sources/Settings/SettingsView.swift | 21 +++++++++---------- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/Application/Presentation/ProfileTab/Sources/Settings/SettingsFeature.swift b/Application/Presentation/ProfileTab/Sources/Settings/SettingsFeature.swift index feb71af6..3c357cfe 100644 --- a/Application/Presentation/ProfileTab/Sources/Settings/SettingsFeature.swift +++ b/Application/Presentation/ProfileTab/Sources/Settings/SettingsFeature.swift @@ -34,13 +34,28 @@ struct SettingsFeature { var loading = LoadingFeature.State() var alertType: Action.AlertType? var appVersion = Self.appVersion() - var appstoreUrl = Bundle.main.object(forInfoDictionaryKey: "TESTFLIGHT_URL") as? String + var betaTestURL = Self.betaTestURL() var policyURL = Bundle.main.object(forInfoDictionaryKey: "PRIVACY_POLICY_URL") as? String var isLoading: Bool { loading.isLoading } + private static func betaTestURL() -> URL? { + let databaseID = Bundle.main.object(forInfoDictionaryKey: "FIRESTORE_DATABASE_ID") as? String + guard databaseID?.trimmingCharacters(in: .whitespacesAndNewlines) == "prod", + let rawValue = Bundle.main.object(forInfoDictionaryKey: "TESTFLIGHT_URL") as? String else { + return nil + } + + let urlString = rawValue.trimmingCharacters(in: .whitespacesAndNewlines) + guard !urlString.isEmpty, !urlString.hasPrefix("$(") else { + return nil + } + + return URL(string: urlString) + } + private static func appVersion() -> String? { let marketingVersion = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String let buildNumber = Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as? String diff --git a/Application/Presentation/ProfileTab/Sources/Settings/SettingsView.swift b/Application/Presentation/ProfileTab/Sources/Settings/SettingsView.swift index 7b275190..b8573210 100644 --- a/Application/Presentation/ProfileTab/Sources/Settings/SettingsView.swift +++ b/Application/Presentation/ProfileTab/Sources/Settings/SettingsView.swift @@ -71,17 +71,16 @@ struct SettingsView: View { .foregroundColor(Color.blue) } } - Button(action: { - if let appStoreString = store.appstoreUrl, - let url = URL(string: appStoreString) { - UIApplication.shared.open(url) - } - }) { - VStack(alignment: .leading) { - Text(String(localized: "settings_join_beta")) - Text(String(localized: "settings_join_beta_subtitle")) - .foregroundStyle(Color.gray) - .font(.caption) + if let betaTestURL = store.betaTestURL { + Button { + UIApplication.shared.open(betaTestURL) + } label: { + VStack(alignment: .leading) { + Text(String(localized: "settings_join_beta")) + Text(String(localized: "settings_join_beta_subtitle")) + .foregroundStyle(Color.gray) + .font(.caption) + } } } } From 22bac7424f8a932b9592b5945b75141d07061deb Mon Sep 17 00:00:00 2001 From: opficdev <162981733+opficdev@users.noreply.github.com> Date: Tue, 7 Jul 2026 11:55:21 +0900 Subject: [PATCH 2/3] =?UTF-8?q?refactor:=20Settings=20=EB=B2=A0=ED=83=80?= =?UTF-8?q?=20URL=20=ED=8C=90=EB=B3=84=20=EB=A1=9C=EC=A7=81=20=EB=B6=84?= =?UTF-8?q?=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProfileTab/Sources/Settings/SettingsFeature.swift | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Application/Presentation/ProfileTab/Sources/Settings/SettingsFeature.swift b/Application/Presentation/ProfileTab/Sources/Settings/SettingsFeature.swift index 3c357cfe..f2201985 100644 --- a/Application/Presentation/ProfileTab/Sources/Settings/SettingsFeature.swift +++ b/Application/Presentation/ProfileTab/Sources/Settings/SettingsFeature.swift @@ -34,17 +34,19 @@ struct SettingsFeature { var loading = LoadingFeature.State() var alertType: Action.AlertType? var appVersion = Self.appVersion() - var betaTestURL = Self.betaTestURL() + var betaTestURL = Self.betaTestURL( + databaseID: Bundle.main.object(forInfoDictionaryKey: "FIRESTORE_DATABASE_ID") as? String, + testFlightURL: Bundle.main.object(forInfoDictionaryKey: "TESTFLIGHT_URL") as? String + ) var policyURL = Bundle.main.object(forInfoDictionaryKey: "PRIVACY_POLICY_URL") as? String var isLoading: Bool { loading.isLoading } - private static func betaTestURL() -> URL? { - let databaseID = Bundle.main.object(forInfoDictionaryKey: "FIRESTORE_DATABASE_ID") as? String + static func betaTestURL(databaseID: String?, testFlightURL: String?) -> URL? { guard databaseID?.trimmingCharacters(in: .whitespacesAndNewlines) == "prod", - let rawValue = Bundle.main.object(forInfoDictionaryKey: "TESTFLIGHT_URL") as? String else { + let rawValue = testFlightURL else { return nil } From 258b70f6d9082dd3d14a138567408a48e5e74a94 Mon Sep 17 00:00:00 2001 From: opficdev <162981733+opficdev@users.noreply.github.com> Date: Tue, 7 Jul 2026 11:56:12 +0900 Subject: [PATCH 3/3] =?UTF-8?q?ui:=20Settings=20=EB=B2=A0=ED=83=80=20?= =?UTF-8?q?=EC=B0=B8=EC=97=AC=20=EB=A7=81=ED=81=AC=20=EC=BB=B4=ED=8F=AC?= =?UTF-8?q?=EB=84=8C=ED=8A=B8=20=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProfileTab/Sources/Settings/SettingsView.swift | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Application/Presentation/ProfileTab/Sources/Settings/SettingsView.swift b/Application/Presentation/ProfileTab/Sources/Settings/SettingsView.swift index b8573210..38e12f77 100644 --- a/Application/Presentation/ProfileTab/Sources/Settings/SettingsView.swift +++ b/Application/Presentation/ProfileTab/Sources/Settings/SettingsView.swift @@ -72,11 +72,10 @@ struct SettingsView: View { } } if let betaTestURL = store.betaTestURL { - Button { - UIApplication.shared.open(betaTestURL) - } label: { + Link(destination: betaTestURL) { VStack(alignment: .leading) { Text(String(localized: "settings_join_beta")) + .foregroundStyle(Color.primary) Text(String(localized: "settings_join_beta_subtitle")) .foregroundStyle(Color.gray) .font(.caption)