NSUnknownKeyException IPhone

Terminating app due to uncaught exception ‘NSUnknownKeyException‘, reason: ‘[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key your_property_name.


You can face NSUnknownKey Exception during your I Phone development. This exception occurs if you created an outlet connection for any controll. I named it your_property_name.

@property (weak, nonatomic) IBOutlet UIButton *your_property_name;

So if you rename your property or delete that outlet then you can face this exception. Because you have deleted that property but compiler still looking that outlet.

Soution of NSUnknownKey Exception



Go to your xib file or story board click on File’s Owner


and switch to Connections Inspector


It will show your property is still connected so just remove the connection from there (click on delete icon)


Leave a comment

Your email address will not be published.