Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Wameedh Mohammed Ali
5,150 PointsBummer! Don't forget to instantiate the dictionary with the contents of the plist!.
What am I doing wrong here? I am actually confused about this code! I just followed the lesson, even though I didn't get what is exactly the NSBundle and NSDictionary!
Thank you Wameedh
import Foundation
// Add your code below
if let plistPath = NSBundle.mainBundle().pathForResource("CrazyInformation", ofType: "plist"),
let crazyInfoDictionary = NSDictionary(contentsOfFile: plistPath),
let currentcrazyInfoDictionary = crazyInfoDictionary["Currentlly"] as? [String: AnyObject]{
}
2 Answers

Vitor Oliveira
6,766 PointsWrite two if let statements and it will work.
import Foundation
if let plistPath = NSBundle.mainBundle().pathForResource("crazyInformation", ofType: "plist") {
if let crazyInformationDictionary = NSDictionary(contentsOfFile: plistPath) {
}
}

Wameedh Mohammed Ali
5,150 PointsThank you!

Nicholas Westmoreland
5,937 PointsPhew, thanks
Max Roberts
2,502 PointsMax Roberts
2,502 PointsHaving the same issue (minus the third line)...