From 52f04ebee66f6659c8346da8fc20684b32000005 Mon Sep 17 00:00:00 2001 From: Satindar Dhillon Date: Mon, 21 Mar 2022 11:19:30 -0700 Subject: [PATCH] add version string to profile/settings view --- .../Sources/App/Views/Profile/ProfileView.swift | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/apple/OmnivoreKit/Sources/App/Views/Profile/ProfileView.swift b/apple/OmnivoreKit/Sources/App/Views/Profile/ProfileView.swift index a50e5643a..ca2443130 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Profile/ProfileView.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Profile/ProfileView.swift @@ -11,6 +11,14 @@ final class ProfileContainerViewModel: ObservableObject { var subscriptions = Set() + var appVersionString: String { + if let appVersion = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String { + return "Omnivore Version \(appVersion)" + } else { + return "" + } + } + func loadProfileData(dataService: DataService) { dataService.viewerPublisher().sink( receiveCompletion: { _ in }, @@ -81,7 +89,7 @@ struct ProfileView: View { #endif } - Section { + Section(footer: Text(viewModel.appVersionString)) { if FeatureFlag.showAccountDeletion { NavigationLink( destination: ManageAccountView(handleAccountDeletion: {