diff options
author | Andrej Mihajlov <and@mullvad.net> | 2020-12-14 16:25:12 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-12-15 15:56:22 +0100 |
commit | 92517bd21e794282c4ac7a9a0dbc80b6c3fec958 (patch) | |
tree | 63d6287843d07cdb8d7cbe8dd264f2f241ff5e8d | |
parent | WireGuardApp: Refactor indicator initialization (diff) | |
download | wireguard-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.swift | 4 |
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 |