aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2020-12-14 16:25:12 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2020-12-15 15:56:22 +0100
commit92517bd21e794282c4ac7a9a0dbc80b6c3fec958 (patch)
tree63d6287843d07cdb8d7cbe8dd264f2f241ff5e8d
parentWireGuardApp: Refactor indicator initialization (diff)
downloadwireguard-apple-92517bd21e794282c4ac7a9a0dbc80b6c3fec958.tar.xz
wireguard-apple-92517bd21e794282c4ac7a9a0dbc80b6c3fec958.zip
WireGuardApp: Use Bundle.forInfoDictionaryKey to access Info.plist fields
Signed-off-by: Andrej Mihajlov <and@mullvad.net>
-rw-r--r--Sources/WireGuardApp/UI/iOS/ViewController/SettingsTableViewController.swift4
1 files changed, 2 insertions, 2 deletions
diff --git a/Sources/WireGuardApp/UI/iOS/ViewController/SettingsTableViewController.swift b/Sources/WireGuardApp/UI/iOS/ViewController/SettingsTableViewController.swift
index 5eeea58..4d353b3 100644
--- a/Sources/WireGuardApp/UI/iOS/ViewController/SettingsTableViewController.swift
+++ b/Sources/WireGuardApp/UI/iOS/ViewController/SettingsTableViewController.swift
@@ -146,8 +146,8 @@ extension SettingsTableViewController {
cell.copyableGesture = false
cell.key = field.localizedUIString
if field == .iosAppVersion {
- var appVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "Unknown version"
- if let appBuild = Bundle.main.infoDictionary?["CFBundleVersion"] as? String {
+ var appVersion = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String ?? "Unknown version"
+ if let appBuild = Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as? String {
appVersion += " (\(appBuild))"
}
cell.value = appVersion