Commit 07a4f345 authored by Steven杜宇's avatar Steven杜宇

// app信息

parent 8a6ad1ea
......@@ -99,8 +99,10 @@ extension UIDevice {
static func appVersion() -> String {
let infoDictionary = Bundle.main.infoDictionary
if let infoDictionary = infoDictionary {
let appVersion = infoDictionary["CFBundleShortVersionString"]
return appVersion as! String
if let appVersion = infoDictionary["CFBundleShortVersionString"] as? String {
return appVersion
}
}
return " "
}
......@@ -109,8 +111,9 @@ extension UIDevice {
static func appBuild() -> String {
let infoDictionary = Bundle.main.infoDictionary
if let infoDictionary = infoDictionary {
let appBuild = infoDictionary["CFBundleVersion"]
return appBuild as! String
if let appBuild = infoDictionary["CFBundleVersion"] as? String {
return appBuild
}
}
return " "
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment