// // AboutView.swift // iosApp // // Created by Iván on 15/02/22. // Copyright © 2022 orgName. All rights reserved. // import SwiftUI struct AboutView: View { private func getVersion() -> String? { return Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String } var body: some View { List { Text("about-text").padding() if let version = getVersion() { HStack { Text("version") Spacer() Text(version).foregroundColor(.secondary) } } Button { if let url = URL(string: NSLocalizedString("app-source-code", comment: "")) { if UIApplication.shared.canOpenURL(url) { UIApplication.shared.open(url, options: [:]) } } } label: { Label("source-code", systemImage: "chevron.left.forwardslash.chevron.right") } Button { if let url = URL(string: NSLocalizedString("app-website", comment: "")) { if UIApplication.shared.canOpenURL(url) { UIApplication.shared.open(url, options: [:]) } } } label: { Label("website", systemImage: "globe") } } } }