0

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.

Jacob Holman
  • 76
  • 2
  • 9

1 Answers1

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