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 Build a Simple iPhone App with Swift Improving Our User Interface Adding a Pop of Color

Jordan Buonforte
Jordan Buonforte
6,013 Points

*** Terminating app due to uncaught exception

*** Terminating app due to uncaught exception 'NSUnknownKeyException', respm: ' [ <FunFacts.ViewController 0x7fe2ec81680> setValue: forUndefinedKey:] this is not key value coding-complaint for the key funFact.' ***First throw call stack:

Does anyone have any idea what this means and what i did wrong? I tried to follow the videos exactly and got lost along the way.

2 Answers

Martin Wildfeuer
PLUS
Martin Wildfeuer
Courses Plus Student 11,071 Points

This is most commonly the result of a storyboard outlet connected to a class property that is not longer there. That is, you might have removed/renamed a property in code that was still connected to an outlet. This is not handled automatically by Xcode, if you remove a connected property in code, you also have to remove that connection in storyboard.

To check for this, switch to storyboard and bring up the utilities column (upper right). Select the element and the connections inspector (top right of the utilities column). Check if there are any unwanted connections and remove them if necessary.

Hope that helps!

How do you check for unwanted connections? I have this...

https://drive.google.com/open?id=0B0U0ox5hQlfZSmhyUVpsbmxzVzQ

Jordan Buonforte
Jordan Buonforte
6,013 Points

i never responded to this but that definitely did help! thanks martin!