Created
August 10, 2020 12:19
-
-
Save foxicode/934cd7180301a7d503aa36e2945e13f1 to your computer and use it in GitHub Desktop.
Getting app version from app bundle
This file contains hidden or 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
| import Foundation | |
| extension Bundle { | |
| var appVersion: String? { | |
| self.infoDictionary?["CFBundleShortVersionString"] as? String | |
| } | |
| static var mainAppVersion: String? { | |
| Bundle.main.appVersion | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment