iPhone App Crash - Error? [duplicate] - iphone

This question already has answers here:
Xcode - How to fix 'NSUnknownKeyException', reason: … this class is not key value coding-compliant for the key X" error?
(79 answers)
Closed 7 years ago.
Im new im making in making iPhone apps so i have no idea what this error means ?
I saw another post with this error but i couldn't figure out how to get it right..
i get this error:
Terminating app due to uncaught exception
'NSUnknownKeyException', reason: '[
setValue:forUndefinedKey:]: this class is not key value coding-compliant for
the key ImageView.'
and i have no clue what this means ? 0.o
can some help me here ?
Thanks!

You might have changed the name of the IBOutlet your nib file refers to.
Check each connection in your nib file to see what it references
Search in your code for that reference to confirm it's there.

Check your nib to see if you have an outlet or action hooked up to a property that no longer exists in the view controller.

I ran into this issue after deleting an object I created in Interface Builder. Deleting the object did not erase all of the code artifacts it had produced.
Here is how I removed the unwanted information in XCode 4.3:
Ctrl + Click the interface builder file, Open As -> Source Code
Press Cmd + F to search for "imageView"
Delete the corresponding XML element. For example, you might erase this entire block of text:
<outlet property="imageView" destination="9W1-Bu-YFJ" id="9xu-Y0-uYk"/>
Repeat steps 2-3 as necessary

You're probably missing the #synthesize for imageView.

Related

'[<UIProxyObject> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key containerView

when i try to init my controller from storyboard in code I have an error : "
Missing proxy for identifier UpstreamPlaceholder-Kat-VH-9Yv.
*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIProxyObject 0x7fad23db07f0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key containerView".
I already deleted in storyboard file and re-create my containerView with all connections & referents but its didn't help. Also I try to delete APP from simulator, change simulator, clean project and restart Xcode(8.0).
Check if you using Storyboard references
If YES - remove them and use push/present from code.
I already had similar situation and references was a reason of crashes. I don't know why, but sometimes adding them in one place can lead to crash in absolutely another without any connection. Only using step-by-step restore I found a reason

nib file removed but key value connection remains - NSUnknownKeyException [duplicate]

This question already has answers here:
Xcode - How to fix 'NSUnknownKeyException', reason: … this class is not key value coding-compliant for the key X" error?
(79 answers)
Closed 7 years ago.
I've been looking through the archives and haven't found a question that answers this. So I'm hoping this is something obvious I'm just missing.
I have an iphone app that's been in the store with various releases over the last 2 years. I finally got frustrated with managing orientation changes through nib files. So I've removed my nib completely from the project and I create all of my fields through code now.
I saw an odd crash in my testing after I'd removed the nib file. But I did some clean up work and couldn't reproduce it. So I've shipped the product. A small subset of my users have seen a crash situation.
I believe I was able to reproduce it in my debugger and got this output.
2012-10-22 08:08:22.776 ChakraChimePro[60502:16d03] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason:
'[<CCProChimeViewController 0x8578100> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key btnRingBowl.'
*** First throw call stack:
(0x1f57022 0x1ccacd6 0x1f56ee1 0x2b6022 0x227f6b 0x227edb 0x242d50 0x78871a 0x1f58dea 0x1ec27f1 0x78726e 0x62d1fc 0x62d779
0x62d99b 0x6490a9 0x648edd 0x6474aa 0x64729e 0x351b 0x564386 0x565274 0x574183 0x574c38 0x568634 0x20eaef5 0x1f2b195 0x1e8fff2
0x1e8e8da 0x1e8dd84 0x1e8dc9b 0x564c65 0x566626 0x2ef6 0x2e25)
terminate called throwing an exception(lldb)
so I've completely removed my class property btnRingBowl. There is no reference to it in the class any more. But I've also completely removed the nib file that was attached to the IBOutlet. So there shouldn't be any reference to it anymore.
Why is my binary still trying to access it?
I've tried deleting the app and reinstalling and the problem goes away.
I've installed the same version of the app that's up on the app store and the problem goes away. I can't reproduce the problem on demand. But I can reproduce it and it's causing crashing for my users.
Since I've completely removed the nib and the properties. I don't know what else I can clean up. Any suggestions?
A string search of my project reveals no reference to this name anywhere.
Thanks,
Kevin
Ran into the same exact problem. NIB/XIB files had been removed long ago (before my initial submit), and only with a recent update fix did this pop-up.
I ended up restoring the old nib files from git, and everything worked. Then removed the broken IB Outlets, rebuild project with those XIB files, and proceed onwards.
I'm not sure if restoring the old nib files will be an option for you, and if not, perhaps rebuilding another nib file of the same name, and force rebuild the project with the new nib file (so it clears the old references out?)

App terminating due to uncaught exception NSUnknownKey Exception , key value not coding compliant [duplicate]

This question already has answers here:
Xcode - How to fix 'NSUnknownKeyException', reason: … this class is not key value coding-compliant for the key X" error?
(79 answers)
Closed 7 years ago.
Sorry for asking such an easy question, but im a beginner
I was following a tutorial on building apps.
I was creating a button, but i accidently named it wrong, i named it instead of when creating the outlet. I named it right though when i created the action. I ran my app and it failed, because my instances called on , not (at least i think thats why my app crashed. So deleted the outlet and and the automatic code xcode writes for the outlet, i remade the outlet and named it right this time. But now when i run my app it terminates, heres the report:
2012-08-21 20:42:07.602 FieldButtonFun[973:c07] * Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key theNutton.'
* First throw call stack:
(0x14b2022 0xeb2cd6 0x14b1ee1 0x9c3022 0x934f6b 0x934edb 0x94fd50 0x23771a 0x14b3dea 0x141d7f1 0x23626e 0xdc1fc 0xdc779 0xdc99b 0x3b401 0x3b670 0x3b836 0x4272a 0x13596 0x14274 0x23183 0x23c38 0x17634 0x139cef5 0x1486195 0x13eaff2 0x13e98da 0x13e8d84 0x13e8c9b 0x13c65 0x15626 0x271d 0x2685)
terminate called throwing an exception
I have no idea what went wrong and i dont understand the error report at all. I thought i already deleted all the automatic code Xcode generated when i created the outlet and remade it. Could anyone help me and find out what could have went wrong?
I could rebuild this app from scratch but i want to understand why this went wrong, for future reference.
Xcode cannot find the value for the key theNutton in the class FieldButtonFun.
It's hard to say what's wrong without see the actual code. But in most cases, there could be a bad connection in the XIB file. Please check the XIB, ctrl-click the File's Owner, see if there is any yellow warning.
Click on your .xib then you will see the files'Owner on top right click on it and check you have any connection in yellow if you have then please click on cross button(X) and from xib right click and drag connection to filer'owner from your uibutton to make action(method)connection.
Then right click and drag from filer'owner to IBOutlet(the uiobject you declare as IBOutlet in your interface).

"NSUnknownKeyException" message with non-existent item [duplicate]

This question already has answers here:
Xcode - How to fix 'NSUnknownKeyException', reason: … this class is not key value coding-compliant for the key X" error?
(79 answers)
Closed 7 years ago.
I got this message when running the app:
Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<examSelf 0x6854ea0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key examQBodyTextView.'
The funny thing is I removed all of the related things with "examQBodyTextView" from the code since they are not needed anymore.
Note: I'm using storyboards.
One of the XIBs in the Storyboard or elsewhere has a hanging reference to examQBodyTextView.
Its blowing up when the View instantiates.
Go through your XIB's and look for an object, mostly likely a Files Owner which has a yellow triangle next to its connection when you right click it. Disconnect that and you should be OK.

Error on empty project: "this class is not key value coding-compliant for the viewcontroller."

this error drives me crazy. I already spent hours on fixing this, unfortunately without success.
I tested my app in simulator, everything works fine. I'am testing it on my device (iphone 4 with ios 4.3.3) the app won't start.
So I tried creating a new project, build and go. And the end of the error now says instead of viewcontroller, key window.
To get further information about the error I setup an exeption breakpoint whicht breaks on throw and on all exeptions. Something interesting happend now: when I am launching the empty project on my iphone I get a warning:
warning: Unable to read symbols for /Users/xxx/Library/Developer/Xcode/DerivedData/testing-cmaekkzgdqyseidlqkorvrdvvodg/Build/Products/Debug-iphoneos/OLDAPP.app/testing (file not found). (The app which I am runnning is called testapp, not OLDAPP?! This was my last project!)
Some further errors now occure:
Unknown class OLDAPPAppDelegate in Interface Builder file. and Unknown class RootViewController in Interface Builder file.
I did clean all targets and made a clean build. Nothing changes…
I didn't change anything in IB, just edited the provisioning profile to run the app on my phone.
Help is very appreciated here :-) Hopefully someone can help me I would be really thankful.
The whole error message: *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UICustomObject 0x18b410> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key window.'
This happens to me if I change the name of an outlet on the ViewController which was connected to something in the View in Interface Builder. For example, renaming 'labelFirstName' to 'lblFirstName' and forgetting to break and recreate the connection in IB.
I had the same problem where there were no !'s in my XIB and no re-naming problems. To fix it, I just created a new XIB, copied in the view from the old XIB, and rewired all the connections.