Created
February 3, 2020 06:54
-
-
Save monsoir/7693c9ae45bef411593b893de45cd4d2 to your computer and use it in GitHub Desktop.
Read App configuration info
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension App { | |
static var infoDictionary: [String: Any]? { | |
return Bundle.main.infoDictionary | |
} | |
static var appVersion: String { | |
return infoDictionary?["CFBundleShortVersionString"] as? String ?? "" | |
} | |
static var appBuildVersion: String { | |
return infoDictionary?["CFBundleVersion"] as? String ?? "" | |
} | |
static var appDisplayName: String { | |
return infoDictionary?["CFBundleDisplayName"] as? String ?? "" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment