Has anyone figured out how to read a plist into an array or dictionary in Swift? I cannot seem to figure it out. I am used to dictionaryWithContentsOfFile however that doesn't seem to be available in swift.
Asked
Active
Viewed 8,439 times
0
-
1Read this page https://stackoverflow.com/questions/24045570/swift-read-plist?rq=1 – Maggick Jun 05 '14 at 14:36
1 Answers
21
See the answer to this question: Swift - Read plist
let path = NSBundle.mainBundle().pathForResource("Config", ofType: "plist")
let dict = NSDictionary(contentsOfFile: path!)

Community
- 1
- 1

Dennis Zoma
- 2,621
- 2
- 17
- 27