Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMartin Foldyna
10,359 Pointshelp with Code Challenge please
I'm getting Bummer: "Don't forget to instantiate the dictionary with the contents of the plist!."
And I Don't know what to do more :(
This is my code:
import Foundation
// Add your code below
let plistPath = NSBundle.mainBundle().pathForResource("CrazyInformation", ofType: "plist"), let weatherDictionary = NSDictionary(contentsOfFile: plistPath)
2 Answers
Darren Poole
3,609 PointsI was struggling with this challenge for a bit also. This worked for me. Watched the video back and at about 4 minutes in I had realised the instance of NSDictionary containing the plistPath wasn't in the curly braces. Hope it helps.
import Foundation
if let plistPath = NSBundle.mainBundle().pathForResource("CrazyInformation", ofType: "plist") { let crazy = NSDictionary(contentsOfFile: plistPath) }
Studio Matrix
Courses Plus Student 4,079 PointsGod damn curly braces got me too
Martin Foldyna
10,359 PointsMartin Foldyna
10,359 PointsYes this help :)
Thank you very much