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!
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

Trent Burkenpas
22,388 PointsMy ribbit app is not running, i'm getting a error message
2014-02-04 14:49:04.318 Ribbit[7280:70b] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<SignupViewController 0x99726e0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key usernameFeild.' *** First throw call stack:
not sure 100 % what is wrong with the app...something to do with usernameField ??
THanks
16 Answers

eirikvaa
18,015 PointsYou should just delete your label and your property and remove any connections between those two in the Connections Inspector, and then set it up properly. Usually solves whatever problems you are having.

eirikvaa
18,015 PointsYou should check if your IBOutlet connection is working correctly. Maybe you renamed your @property? Hover over the outlet @property in your controller to see that it hightlights the correct view in your scene and check the Connections Inspector (the right-most tab in the Utilities panel (which is the right-most panel)) for faulty connections.

Sabine Geithner
3,264 PointsHey, this usually happens when you change the outlet name, but view that was connected to that outlet still holds the reference to the old name. Simple solution: "right click" (or ctrl click) on the item in your storyboard and remove the old outlet in the popup window by simply clicking on the cross.

Stefan Jansen
8,974 Pointsthe error says that you try to add an object to a dictionary with a key that is most likely is nil. Check the part of your code where you write the value from the username field to a NSString.

Trent Burkenpas
22,388 Pointshmm I can't seem to find an error, I assume this si the code you are talking about
- (IBAction)signup:(id)sender {
NSString *username = [self.usernameField.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
NSString *password = [self.passwordField.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
NSString *email = [self.emailField.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
if([username length] == 0 || [password length] == 0 || [email length] == 0){
UIAlertView *alertview = [[UIAlertView alloc] initWithTitle:@"Oops!" message:@"Make sure you enter a username, password, and email address!" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil];
[alertview show];
}
}

Stefan Jansen
8,974 Pointssearch your code for this exact string: usernameFeild
and replace it with usernameField
.
your issue is that you misspelled usernameField :)

Trent Burkenpas
22,388 PointsWhat I did? I dont see it lol

Stefan Jansen
8,974 PointsField is written with the i
before the e
, not after it!

Trent Burkenpas
22,388 PointsYeah, thats what I did....where are you seeing the misspelling? Because im having a hard time finding it lol

Stefan Jansen
8,974 Pointsin your first post. in the error message :)
in xcode you can do shift+cmd+f to find inside a project and search for usernameFeild

Trent Burkenpas
22,388 PointsIm getting "NO Results for usernameFeild" Thats weird, because I see that in the error message, but every time i spelled usernameField, I spelled it correctly. I did however spelled it wrong when setting up my storyboard properties, but i corrected it. Maybe thats is why idk

Stefan Jansen
8,974 Pointsthats weird, got any possibility to zip and upload your project. I'll have a look at it.

Trent Burkenpas
22,388 PointsIm not sure 100% how to do that lol

Stefan Jansen
8,974 Pointsthats a possibility, but I never liked this solution. Doesn't really help with understanding what issue is and that is actually valuable information.

eirikvaa
18,015 PointsI get this error message from time to time, and usually it's Xcode being weird and stubborn. It's generally a result of not linking the correct custom class to the scene, changing the name of the IBOutlet or something else after you initially set the connection up.

Trent Burkenpas
22,388 PointsOk yeah that worked, it must of saved the misspelled version, even though i changed it.

eirikvaa
18,015 PointsGreat! You should mark the answer that helped you as the Best Answer so it shows up in the feed as solved.

Trent Burkenpas
22,388 PointsOk yeah that worked, it must of saved the misspelled version, even though i changed it.