WireGuardApp: Use Bundle.forInfoDictionaryKey to access Info.plist fields
Signed-off-by: Andrej Mihajlov <and@mullvad.net>
This commit is contained in:
parent
761f635e16
commit
92517bd21e
|
@ -146,8 +146,8 @@ extension SettingsTableViewController {
|
||||||
cell.copyableGesture = false
|
cell.copyableGesture = false
|
||||||
cell.key = field.localizedUIString
|
cell.key = field.localizedUIString
|
||||||
if field == .iosAppVersion {
|
if field == .iosAppVersion {
|
||||||
var appVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "Unknown version"
|
var appVersion = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String ?? "Unknown version"
|
||||||
if let appBuild = Bundle.main.infoDictionary?["CFBundleVersion"] as? String {
|
if let appBuild = Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as? String {
|
||||||
appVersion += " (\(appBuild))"
|
appVersion += " (\(appBuild))"
|
||||||
}
|
}
|
||||||
cell.value = appVersion
|
cell.value = appVersion
|
||||||
|
|
Loading…
Reference in New Issue