Created
November 1, 2017 15:37
-
-
Save AhiyaHiya/e9e05f19b8f7fc213f11e9b2f615a557 to your computer and use it in GitHub Desktop.
Set the version label from the plist info (iOS and macOS)
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
| func setVersionLabel() | |
| { | |
| let mainBundle = Bundle.main | |
| let version = mainBundle.infoDictionary!["CFBundleShortVersionString"] as! String | |
| let build = mainBundle.infoDictionary![kCFBundleVersionKey as String] as! String | |
| versionLabel.text = "Version \(version) Build: \(build)" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment