0

I am getting an error that only appeared after I updated to Xcode 8.1. It appears in the AppDelegate.swift page on the line of

class AppDelegate: UIResponder, UIApplicationDelegate {

The error states “Thread 1: signal SIGABRT”. The app crashes when I try to segue from the initial screen to a second screen. On the second screen there is a picker view component and I am certain the error has to do with the initiation of that component, but no specific error is showing up on that ViewController page. The crash log states

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

(Note: ErrorTesting is just the name of the app right now because I created a short code just surrounding this specific issue to send to Apple Developer Technical Support if I cannot figure this out, but it really seems to be something I am just overlooking so ideally I don't want to use one of those credits right now.)

Here is the code of the View Controller that has the PickerView:

Code overview of ViewController screen with PickerView

Thank you in advance for your help. Any suggestions or advice would be much appreciated. I have already scoured the internet, but I cannot find any information on the PickerView configuration for this most recent update. Apple does have a sample code posted for PickerView in Xcode 8.1 (https://developer.apple.com/library/content/samplecode/UICatalog/Listings/Swift_UIKitCatalog_PickerViewController_swift.html#//apple_ref/doc/uid/DTS40007710-Swift_UIKitCatalog_PickerViewController_swift-DontLinkElementID_73), but I still cannot figure out what is different about my code to theirs.

vadian
  • 274,689
  • 30
  • 353
  • 361
  • Don't post screenshots, post text. – vadian Dec 21 '16 at 15:06
  • 1
    In your ViewController in the Storyboard, you previously linked the IBOutlet to a UIPickerView named PickerView, and now it's named `Species_picker`, undo the link, and redo it to the new one. Also, don't start naming your var starting with an uppercase. – Larme Dec 21 '16 at 15:10
  • Possible duplicate of [What does this mean? "'NSUnknownKeyException', reason: … this class is not key value coding-compliant for the key X"](http://stackoverflow.com/questions/3088059/what-does-this-mean-nsunknownkeyexception-reason-this-class-is-not-key-v) One of the two top answers is your issue. – Larme Dec 21 '16 at 15:12

0 Answers0