UIApplication: Make properties optional
Don't want the application to crash because of a force unwrap. Signed-off-by: kingbri <bdashore3@gmail.com>
This commit is contained in:
parent
79d88ffab6
commit
f9b6587e31
1 changed files with 2 additions and 2 deletions
|
|
@ -10,11 +10,11 @@ import SwiftUI
|
|||
// Extensions to get the version/build number for AboutView
|
||||
extension UIApplication {
|
||||
var appVersion: String {
|
||||
Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as! String
|
||||
Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String ?? "0.0.0"
|
||||
}
|
||||
|
||||
var appBuild: String {
|
||||
Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as! String
|
||||
Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as? String ?? "0"
|
||||
}
|
||||
|
||||
var buildType: String {
|
||||
|
|
|
|||
Loading…
Reference in a new issue