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

Michael Lee
Michael Lee
5,441 Points

Ribbit - Unknown Key Exception

Having a hard time figuring this out. The first time I encountered this was before I was able to recognize a currentUser. Now that I tried to put in a log out button in the nav controller, it is doing the same thing. It worked the first time, but once I logged out, it crashed on me.

This is what it is saying:

setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key login.

Edit: going over everything, I see that the StoreKit Framework is automatically putting the in-app purchases options on and therefore requiring me to sign up as an apple dev (which I haven't done yet). Would this be something that would hold me back? I have downloaded and run the teachers version of Ribbit and it's worked fine despite being basically the same thing. I really don't get this problem.

3 Answers

Chris McKnight
Chris McKnight
11,045 Points

It sounds like you have an invalid outlet or runtime attribute. Check the connections inspector of your button to see if it has an outlet that is linked to a property that doesn't exist. If you do hit the X next to the outlet to remove it. Check the Identity Inspector for any invalid custom runtime attributes as well.

Michael Lee
Michael Lee
5,441 Points

Dude. Awesome. I realize now that just deleting the code for an IBOutlet doesn't delete the link created. I was basically getting to the same answer as soon as I stopped freaking out and looking at stackoverflow for some clues - you made it much easier though. THANK YOU!

Chris McKnight
Chris McKnight
11,045 Points

No problem. Agreed. This happens to me whenever I refactor property names for outlets and forget to delete the key, so, the app crashes.

Glad to help