mirror of
https://github.com/AU-COVIDSafe/mobile-ios.git
synced 2025-04-19 21:15:21 +00:00
COVIDSafe code from version 1.1
This commit is contained in:
commit
3640e52eb2
330 changed files with 261540 additions and 0 deletions
38
CovidSafe/Feedback/Sources/BundleInfoExtension.swift
Normal file
38
CovidSafe/Feedback/Sources/BundleInfoExtension.swift
Normal file
|
@ -0,0 +1,38 @@
|
|||
// Copyright © 2020 Australian Government All rights reserved.
|
||||
|
||||
import Foundation
|
||||
|
||||
private class JMCBundleHandle: NSObject { }
|
||||
|
||||
extension Foundation.Bundle {
|
||||
var version: String? {
|
||||
return infoDictionary?["CFBundleVersion"] as? String
|
||||
}
|
||||
|
||||
var versionShort: String? {
|
||||
return infoDictionary?["CFBundleShortVersionString"] as? String
|
||||
}
|
||||
|
||||
var name: String? {
|
||||
return infoDictionary?["CFBundleName"] as? String
|
||||
}
|
||||
|
||||
var displayName: String? {
|
||||
return infoDictionary?["CFBundleDisplayName"] as? String
|
||||
}
|
||||
|
||||
var identifier: String? {
|
||||
return bundleIdentifier
|
||||
}
|
||||
|
||||
var infoAsDictionary: [String: NSObject] {
|
||||
|
||||
return [
|
||||
"appVersion": (version ?? "") as NSObject,
|
||||
"appVersionShort": versionShort as NSObject? ?? "" as NSObject,
|
||||
"appName": (name ?? "") as NSObject,
|
||||
"appDisplayName": (displayName ?? "") as NSObject,
|
||||
"appId": (identifier ?? "") as NSObject
|
||||
]
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue