Removed force unwrapping
This commit is contained in:
parent
264cc6c87c
commit
13e28f6f3f
|
@ -216,9 +216,8 @@ struct SettingsView: View {
|
||||||
}
|
}
|
||||||
|
|
||||||
private func appVersion() -> String {
|
private func appVersion() -> String {
|
||||||
let dict = NSDictionary(contentsOf: Bundle.main.url(forResource: "Info", withExtension: "plist")!)
|
let version = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String ?? ""
|
||||||
let version = dict?.object(forKey: "CFBundleShortVersionString") as? String ?? ""
|
let build = Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as? String ?? ""
|
||||||
let build = dict?.object(forKey: "CFBundleVersion") as? String ?? ""
|
|
||||||
return "NetNewsWire \(version) (Build \(build))"
|
return "NetNewsWire \(version) (Build \(build))"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue