Created
February 9, 2017 09:26
-
-
Save qdequele/1b5e57657185fa2ddd4cd2a6174417e9 to your computer and use it in GitHub Desktop.
This file contains 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
// | |
// PlistHelper.swift | |
// Crisp-ios | |
// | |
// Created by Quentin DEQUELEN on 12/3/16. | |
// Copyright © 2016 qdequele. All rights reserved. | |
// | |
import Foundation | |
class Plist { | |
class func get(name: String) -> String { | |
var myDict: NSDictionary? | |
if let path = Bundle.main.path(forResource: "Config", ofType: "plist") { | |
myDict = NSDictionary(contentsOfFile: path) | |
} | |
if let dict = myDict { | |
return dict.object(forKey: name) as! String | |
} | |
return "" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment