Created
December 27, 2016 05:08
-
-
Save jules2689/2523f4723b7c50fc2f4ce45e135717b9 to your computer and use it in GitHub Desktop.
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
import Foundation | |
class Secrets { | |
enum SecretsError: Error { | |
case NotFound | |
} | |
class func secrets() -> Dictionary<String, Any?> { | |
if let path = Bundle.main.path(forResource: "Secrets", ofType: "plist") { | |
if let dict = NSDictionary(contentsOfFile: path) as? Dictionary<String, AnyObject> { | |
return dict | |
} | |
} | |
print("No Secrets file found") | |
return Dictionary<String, Any?>() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment