iosobjective-cundefinednsunknownkeyexception

Objective-C Bug this class is not key value coding-compliant for the key dateAMPM


While I was working on my IPhone application for school I was in the midst of storing the data so it could be used after closing the application and I changed the name of one of the variables from dateAMPM to alarmAMPM and now it is giving me this error: 2014-10-23 19:33:12.093 Exercise Alarm[24489:811187] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key dateAMPM.'


Solution

  • Take a look at the storyboard.

    You still have the dateAMPM and the dateLabel outlets tied to the initial view controller. you actually have to right click on the first icon on the top and manually delete the connection (click on the cross), where the yellow warning sign displays.

    screenshot.