Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,23 @@ struct SettingsFeature {
var activeLoadingRow: ActiveLoadingRow?
var loading = LoadingFeature.State()
var alertType: Action.AlertType?
var appVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String
var appVersion = Self.appVersion()
var appstoreUrl = 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 appVersion() -> String? {
let marketingVersion = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String
let buildNumber = Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as? String
let components = [marketingVersion, buildNumber]
.compactMap { $0?.trimmingCharacters(in: .whitespacesAndNewlines) }
.filter { !$0.isEmpty }

return components.isEmpty ? nil : components.joined(separator: ".")
}
Comment thread
opficdev marked this conversation as resolved.
}

enum Action: BindableAction {
Expand Down
2 changes: 1 addition & 1 deletion Application/Shared/Version.xcconfig
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
MARKETING_VERSION = 1.2.6
MARKETING_VERSION = 1.3
IPHONEOS_DEPLOYMENT_TARGET = 17.0
Loading