Show released version number and build version number in about page
This commit is contained in:
parent
f75f949ab1
commit
8d9965f7da
2 changed files with 10 additions and 2 deletions
|
|
@ -29,7 +29,7 @@ class AboutTableViewController: BasicStaticTableViewController {
|
|||
let view = UIView()
|
||||
let footerLabel = UILabel(frame: CGRect(x: 8, y: 15, width: tableView.frame.width, height: 60))
|
||||
footerLabel.numberOfLines = 0
|
||||
footerLabel.text = "Pass for iOS \(Globals.version)"
|
||||
footerLabel.text = "Pass for iOS \(Bundle.main.releaseVersionNumber!) (\(Bundle.main.buildVersionNumber!))"
|
||||
footerLabel.font = UIFont.preferredFont(forTextStyle: .footnote)
|
||||
footerLabel.textColor = UIColor.lightGray
|
||||
footerLabel.textAlignment = .center
|
||||
|
|
|
|||
|
|
@ -20,10 +20,18 @@ class Globals {
|
|||
|
||||
static let repositoryPath = "\(libraryPath)/password-store"
|
||||
static var passcodeConfiguration = PasscodeLockConfiguration()
|
||||
static let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as! String
|
||||
|
||||
static let red = UIColor(red:1.00, green:0.23, blue:0.19, alpha:1.0)
|
||||
static let blue = UIColor(red:0.00, green:0.48, blue:1.00, alpha:1.0)
|
||||
|
||||
private init() { }
|
||||
}
|
||||
|
||||
extension Bundle {
|
||||
var releaseVersionNumber: String? {
|
||||
return infoDictionary?["CFBundleShortVersionString"] as? String
|
||||
}
|
||||
var buildVersionNumber: String? {
|
||||
return infoDictionary?["CFBundleVersion"] as? String
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue