Skip to content

Commit 22bac74

Browse files
committed
refactor: Settings 베타 URL 판별 로직 분리
1 parent 0e1bc02 commit 22bac74

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

Application/Presentation/ProfileTab/Sources/Settings/SettingsFeature.swift

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,19 @@ struct SettingsFeature {
3434
var loading = LoadingFeature.State()
3535
var alertType: Action.AlertType?
3636
var appVersion = Self.appVersion()
37-
var betaTestURL = Self.betaTestURL()
37+
var betaTestURL = Self.betaTestURL(
38+
databaseID: Bundle.main.object(forInfoDictionaryKey: "FIRESTORE_DATABASE_ID") as? String,
39+
testFlightURL: Bundle.main.object(forInfoDictionaryKey: "TESTFLIGHT_URL") as? String
40+
)
3841
var policyURL = Bundle.main.object(forInfoDictionaryKey: "PRIVACY_POLICY_URL") as? String
3942

4043
var isLoading: Bool {
4144
loading.isLoading
4245
}
4346

44-
private static func betaTestURL() -> URL? {
45-
let databaseID = Bundle.main.object(forInfoDictionaryKey: "FIRESTORE_DATABASE_ID") as? String
47+
static func betaTestURL(databaseID: String?, testFlightURL: String?) -> URL? {
4648
guard databaseID?.trimmingCharacters(in: .whitespacesAndNewlines) == "prod",
47-
let rawValue = Bundle.main.object(forInfoDictionaryKey: "TESTFLIGHT_URL") as? String else {
49+
let rawValue = testFlightURL else {
4850
return nil
4951
}
5052

0 commit comments

Comments
 (0)