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 trial

iOS Objective-C Basics (Retired) Foundation Framework NSDictionary

I don't understand what is wrong??

Can someone help me with my coding please as I don't understand whats wrong!

4 Answers

What is wrong with this piece of code:

Let's add the year of the album to the 'albumMutable' variable. Where the key is a NSString 'year' and the value is also a NSString '1969'

[albumMutable setObject:@1969 forKey:@"year"];

Ethan Neff
Ethan Neff
27,058 Points

try @"1969" b/c it wants an NSString

J Scott Erickson
J Scott Erickson
11,883 Points

Is there a more specific question that you have? Or in general are you looking for guidance?

I can't believe I didnt think of that, why does a NSString have to have speech marks?