Skip to content

Commit 3ecaf4e

Browse files
authored
[#650] 마케팅 버전을 1.3으로 설정한다 (#652)
* chore: 마케팅 버전을 1.3으로 수정 * chore: 로컬 기본 빌드 번호를 0으로 수정 * refactor: 앱 버전 표시 형식 정리 * chore: 로컬 기본 빌드 번호를 1로 복구
1 parent 1abba72 commit 3ecaf4e

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

Application/DevLogPresentation/Sources/Settings/SettingsFeature.swift

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,23 @@ struct SettingsFeature {
3333
var activeLoadingRow: ActiveLoadingRow?
3434
var loading = LoadingFeature.State()
3535
var alertType: Action.AlertType?
36-
var appVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String
36+
var appVersion = Self.appVersion()
3737
var appstoreUrl = Bundle.main.object(forInfoDictionaryKey: "TESTFLIGHT_URL") as? String
3838
var policyURL = Bundle.main.object(forInfoDictionaryKey: "PRIVACY_POLICY_URL") as? String
3939

4040
var isLoading: Bool {
4141
loading.isLoading
4242
}
43+
44+
private static func appVersion() -> String? {
45+
let marketingVersion = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String
46+
let buildNumber = Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as? String
47+
let components = [marketingVersion, buildNumber]
48+
.compactMap { $0?.trimmingCharacters(in: .whitespacesAndNewlines) }
49+
.filter { !$0.isEmpty }
50+
51+
return components.isEmpty ? nil : components.joined(separator: ".")
52+
}
4353
}
4454

4555
enum Action: BindableAction {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
MARKETING_VERSION = 1.2.6
1+
MARKETING_VERSION = 1.3
22
IPHONEOS_DEPLOYMENT_TARGET = 17.0

0 commit comments

Comments
 (0)