diff --git a/NativeAppTemplate/Constants.swift b/NativeAppTemplate/Constants.swift index b898d3e..895d3f4 100644 --- a/NativeAppTemplate/Constants.swift +++ b/NativeAppTemplate/Constants.swift @@ -220,7 +220,6 @@ extension String { static let myAccount = "My Account" static let profile = "Profile" - static let information = "Information" static let supportWebsite = "Support Website" static let howToUse = "How To Use" static let faqs = "FAQs" diff --git a/NativeAppTemplate/UI/Settings/SettingsView.swift b/NativeAppTemplate/UI/Settings/SettingsView.swift index 4fc6c13..7274581 100644 --- a/NativeAppTemplate/UI/Settings/SettingsView.swift +++ b/NativeAppTemplate/UI/Settings/SettingsView.swift @@ -52,11 +52,7 @@ struct SettingsView: View { } .listRowBackground(Color.cardBackground.opacity(0.7)) - Section(header: Text(String.information)) { - Link(destination: URL(string: String.supportWebsiteUrl)!) { - Label(String.supportWebsite, systemImage: "globe") - } - + Section(header: Text(verbatim: "Support")) { Link(destination: URL(string: String.howToUseUrl)!) { Label(String.howToUse, systemImage: "info") } @@ -74,12 +70,28 @@ struct SettingsView: View { } label: { Label(String.rateApp, systemImage: "hand.thumbsup") } + } + .listRowBackground(Color.cardBackground.opacity(0.7)) + Section(header: Text(verbatim: "About")) { + Link(destination: URL(string: String.supportWebsiteUrl)!) { + Label("Website", systemImage: "globe") + } Link(destination: URL(string: String.privacyPolicyUrl)!) { - Text(String.privacyPolicy) + Label(String.privacyPolicy, systemImage: "hand.raised") } Link(destination: URL(string: String.termsOfUseUrl)!) { - Text(String.termsOfUse) + Label(String.termsOfUse, systemImage: "doc.text") + } + } + .listRowBackground(Color.cardBackground.opacity(0.7)) + + Section(header: Text(verbatim: "App")) { + HStack { + Text(verbatim: "Version") + Spacer() + Text(appVersion) + .foregroundStyle(.secondary) } } .listRowBackground(Color.cardBackground.opacity(0.7)) @@ -109,6 +121,10 @@ struct SettingsView: View { .navigationBarTitleDisplayMode(.inline) } + private var appVersion: String { + "\(Bundle.main.appVersionLong) (\(Bundle.main.appBuild))" + } + var supportEmailURL: URL { let appName = Bundle.main.displayName let appVersion = "\(Bundle.main.appVersionLong)"