mirror of
https://github.com/AU-COVIDSafe/mobile-ios.git
synced 2025-05-08 22:35:19 +00:00
COVIDSafe code from version 1.1
This commit is contained in:
commit
3640e52eb2
330 changed files with 261540 additions and 0 deletions
CovidSafe
24
CovidSafe/PlistHelper.swift
Normal file
24
CovidSafe/PlistHelper.swift
Normal file
|
@ -0,0 +1,24 @@
|
|||
import Foundation
|
||||
|
||||
struct PlistHelper {
|
||||
static func getvalueFromInfoPlist(withKey key: String) -> String? {
|
||||
return getvalueFromInfoPlist(withKey: key, plistName: "Info")
|
||||
}
|
||||
|
||||
static func getvalueFromInfoPlist(withKey key: String, plistName: String) -> String? {
|
||||
if let path = Bundle.main.path(forResource: plistName, ofType: "plist"),
|
||||
let keyValue = NSDictionary(contentsOfFile: path)?.value(forKey: key) as? String {
|
||||
return keyValue
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
static func getBoolFromInfoPlist(withKey key: String, plistName: String) -> Bool? {
|
||||
if let path = Bundle.main.path(forResource: plistName, ofType: "plist"),
|
||||
let keyValue = NSDictionary(contentsOfFile: path)?.value(forKey: key) as? Bool {
|
||||
return keyValue
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue