i am trying to read from propriety list using swift but im getting this error, and thats the code im using to read from my plist :
Arrays i'm using :
var recipeNames :[String] = []
var recipeImages :[String] = []
var recipeTime :[String] = []
In viewDidload :
var path = NSBundle.mainBundle().pathForResource("recipes", ofType: "plist")
var dict = NSDictionary(contentsOfFile: path!)
recipeNames = dict!.objectForKey("name")! as! [String]
recipeImages = dict!.objectForKey("image")! as! [String]
recipeTime = dict!.objectForKey("time")! as! [String]
Seems to be no error in your code, Check that the arrays in plist has the same naming as in your code might be mistaken something with keys.
You can check that by
right-clickon plist andOpen-asthen choosesource codeLike :
objectForKey("name")called<key>name</key>objectForKey("image")called<key>image</key>objectForKey("time")called<key>time</key>