Disclaimer: I'm quite new to the language, so I apologize if I've done something illogical or explain something incorrectly. I'm also new to StackOverflow...
So far, in Xcode (Objective-C), I've started an empty project and added a View Controller object with a Collection View object inside of it that contains a single Collection View Cell. That cell has Image View & Label objects (one of each). I've added a Storyboard and ViewController.h + ViewController.m pair of files (subclass of UIViewController).
Initially I started with an empty project template, but ran into problems and deleted the project folder and started over with a single-view template.
Now, whenever I use any CollectionView object in any project, I get an error from Xcode upon running it. It appears in Thread 1, the "main" section of the Debug Navigator:
"Terminating app due to uncaught exception 'NSUnknownKeyException',
reason: '[<ViewController 0x7419bb0> setValue:forUndefinedKey:]: this
class is not key value coding-compliant for the key breadboxCollectionView.'"
I did use "breadboxCollectionView" as an outlet property name for a CollectionView object, tied to my ViewController header. I did that in one of my prior projects though.
If I add a second Collection View object, and tie it to the View Controller header file, as an outlet to a property named "breadboxCollectionView" then the application launches without throwing any exceptions. It doesn't display the second collection view object, but I'm going to consider that an entirely different hurdle at this point. I need the reference to "breadboxCollectionView" to vanish.
I tried to delete the second Collection View object, but after running the application afterward: boom, same error shows up.
I tried to delete the second Collection View object by doing these things in this order: 1) delete outlet connection 2) delete the property entry in the view controller header file 3) delete the second collection view object.
I've removed and reinstalled Xcode. I've removed all traces of prior projects. I've started a new project from scratch... again. I've also opened my *.storyboard file with a text editor outside of Xcode and searched for any traces of "breadboxCollectionView."
I'm still getting the same error, with the same reference to "breadboxCollectionView" and cannot locate where this variable is listed on my computer to fix it.
I've tried going over other questions here, about NSUnknownKeyException errors, but it seems that each one tends to be rather unique. The Apple Developer documentation is also less than helpful, in my opinion, for this situation.
Does anyone have ANY suggestions?
UPDATE 1:
I just did the following, and actually found a reference to "breadboxCollectionView." Though, it didn't help:
- opened xcode.app package contents
- finder search for breadbox
- only one file appeared
- opened with xcode
- no sign of the variable in xcode
- closed xcode and reopened with textedit.app
- cmd+F to search for "breadbox"
a single result displayed within a *.storyboard file; I thought I did this and discovered nothing previously:
<class className="ViewController" superclassName="UIViewController"> <source key="sourceIdentifier" type="project" relativePath="./Classes/ViewController.h"/> <relationships> <relationship kind="outlet" name="BreadrackCollectionView" candidateClass="UICollectionView"/> <relationship kind="outlet" name="breadboxCollectionView" candidateClass="UICollectionView"/> </relationships> </class>
deleted the entry
- saved with textedit.app
- closed and reopened with xcode
- ran project
- simulator throws the same error still.
Is there a way to completely cleanse my computer of 100% of Xcode, and start over? I haven't done a whole lot with this, and it's my only project. I shouldn't be missing anything important. Should I need to do that, even?