What does this mean? “'NSUnknownKeyException', reason: … this class is not key value coding-compliant for...












1052















I'm trying to link a UILabel with an IBOutlet created in my class.



My application is crashing with the following error. What does this mean? How can I fix it?




*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIViewController 0x6e36ae0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key XXX.'











share|improve this question




















  • 10





    pedrotorres is right. Yes this is right. If you are doing a UITableViewCell, in IB remember to make teh File's Owner to NSObject, and the UITableViewCell'Class to the .h class you defined.

    – giuseppe
    May 24 '13 at 7:56






  • 2





    When you encounter such an issue and the offending key is an action rather than an outlet then most probably you have an outlet which mistakenly references your action function name instead of your outlet variable name.

    – Alex Yursha
    Jun 4 '15 at 15:50








  • 2





    You should notice that the name of the key in the error message (the OP is calling it 'XXXX') is the name you gave to something in your nib file. That's should help narrow down your search.

    – kris
    Jul 12 '15 at 21:51











  • I filed rdar://22105925 asking Apple to make these errors more obvious at build time. :)

    – jtbandes
    Aug 1 '15 at 22:35











  • how to actually IMMEDIATELY SOLVE the problem! stackoverflow.com/a/13812660/294884 fantastic tip

    – Fattie
    Sep 28 '15 at 13:01
















1052















I'm trying to link a UILabel with an IBOutlet created in my class.



My application is crashing with the following error. What does this mean? How can I fix it?




*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIViewController 0x6e36ae0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key XXX.'











share|improve this question




















  • 10





    pedrotorres is right. Yes this is right. If you are doing a UITableViewCell, in IB remember to make teh File's Owner to NSObject, and the UITableViewCell'Class to the .h class you defined.

    – giuseppe
    May 24 '13 at 7:56






  • 2





    When you encounter such an issue and the offending key is an action rather than an outlet then most probably you have an outlet which mistakenly references your action function name instead of your outlet variable name.

    – Alex Yursha
    Jun 4 '15 at 15:50








  • 2





    You should notice that the name of the key in the error message (the OP is calling it 'XXXX') is the name you gave to something in your nib file. That's should help narrow down your search.

    – kris
    Jul 12 '15 at 21:51











  • I filed rdar://22105925 asking Apple to make these errors more obvious at build time. :)

    – jtbandes
    Aug 1 '15 at 22:35











  • how to actually IMMEDIATELY SOLVE the problem! stackoverflow.com/a/13812660/294884 fantastic tip

    – Fattie
    Sep 28 '15 at 13:01














1052












1052








1052


209






I'm trying to link a UILabel with an IBOutlet created in my class.



My application is crashing with the following error. What does this mean? How can I fix it?




*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIViewController 0x6e36ae0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key XXX.'











share|improve this question
















I'm trying to link a UILabel with an IBOutlet created in my class.



My application is crashing with the following error. What does this mean? How can I fix it?




*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIViewController 0x6e36ae0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key XXX.'








ios macos cocoa cocoa-touch interface-builder






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 22 '17 at 16:20


























community wiki





21 revs, 13 users 40%
Guillaume Dubois









  • 10





    pedrotorres is right. Yes this is right. If you are doing a UITableViewCell, in IB remember to make teh File's Owner to NSObject, and the UITableViewCell'Class to the .h class you defined.

    – giuseppe
    May 24 '13 at 7:56






  • 2





    When you encounter such an issue and the offending key is an action rather than an outlet then most probably you have an outlet which mistakenly references your action function name instead of your outlet variable name.

    – Alex Yursha
    Jun 4 '15 at 15:50








  • 2





    You should notice that the name of the key in the error message (the OP is calling it 'XXXX') is the name you gave to something in your nib file. That's should help narrow down your search.

    – kris
    Jul 12 '15 at 21:51











  • I filed rdar://22105925 asking Apple to make these errors more obvious at build time. :)

    – jtbandes
    Aug 1 '15 at 22:35











  • how to actually IMMEDIATELY SOLVE the problem! stackoverflow.com/a/13812660/294884 fantastic tip

    – Fattie
    Sep 28 '15 at 13:01














  • 10





    pedrotorres is right. Yes this is right. If you are doing a UITableViewCell, in IB remember to make teh File's Owner to NSObject, and the UITableViewCell'Class to the .h class you defined.

    – giuseppe
    May 24 '13 at 7:56






  • 2





    When you encounter such an issue and the offending key is an action rather than an outlet then most probably you have an outlet which mistakenly references your action function name instead of your outlet variable name.

    – Alex Yursha
    Jun 4 '15 at 15:50








  • 2





    You should notice that the name of the key in the error message (the OP is calling it 'XXXX') is the name you gave to something in your nib file. That's should help narrow down your search.

    – kris
    Jul 12 '15 at 21:51











  • I filed rdar://22105925 asking Apple to make these errors more obvious at build time. :)

    – jtbandes
    Aug 1 '15 at 22:35











  • how to actually IMMEDIATELY SOLVE the problem! stackoverflow.com/a/13812660/294884 fantastic tip

    – Fattie
    Sep 28 '15 at 13:01








10




10





pedrotorres is right. Yes this is right. If you are doing a UITableViewCell, in IB remember to make teh File's Owner to NSObject, and the UITableViewCell'Class to the .h class you defined.

– giuseppe
May 24 '13 at 7:56





pedrotorres is right. Yes this is right. If you are doing a UITableViewCell, in IB remember to make teh File's Owner to NSObject, and the UITableViewCell'Class to the .h class you defined.

– giuseppe
May 24 '13 at 7:56




2




2





When you encounter such an issue and the offending key is an action rather than an outlet then most probably you have an outlet which mistakenly references your action function name instead of your outlet variable name.

– Alex Yursha
Jun 4 '15 at 15:50







When you encounter such an issue and the offending key is an action rather than an outlet then most probably you have an outlet which mistakenly references your action function name instead of your outlet variable name.

– Alex Yursha
Jun 4 '15 at 15:50






2




2





You should notice that the name of the key in the error message (the OP is calling it 'XXXX') is the name you gave to something in your nib file. That's should help narrow down your search.

– kris
Jul 12 '15 at 21:51





You should notice that the name of the key in the error message (the OP is calling it 'XXXX') is the name you gave to something in your nib file. That's should help narrow down your search.

– kris
Jul 12 '15 at 21:51













I filed rdar://22105925 asking Apple to make these errors more obvious at build time. :)

– jtbandes
Aug 1 '15 at 22:35





I filed rdar://22105925 asking Apple to make these errors more obvious at build time. :)

– jtbandes
Aug 1 '15 at 22:35













how to actually IMMEDIATELY SOLVE the problem! stackoverflow.com/a/13812660/294884 fantastic tip

– Fattie
Sep 28 '15 at 13:01





how to actually IMMEDIATELY SOLVE the problem! stackoverflow.com/a/13812660/294884 fantastic tip

– Fattie
Sep 28 '15 at 13:01












66 Answers
66






active

oldest

votes













1 2
3
next












870














Your view controller may have the wrong class in your xib.



I downloaded your project.



The error you are getting is




'NSUnknownKeyException', reason: '[<UIViewController 0x3927310> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key string.'




It is caused by the Second view controller in MainWindow.xib having a class of UIViewController instead of SecondView. Changing to the correct class resolves the problem.



By the way, it is bad practice to have names like "string" in Objective-C. It invites a runtime naming collision. Avoid them even in once off practice apps. Naming collisions can be very hard to track down and you don't want to waste the time.



Another possible reason for this error: when copying & pasting elements from one controller into another, Xcode somehow keeps that link to the original controller, even after editing & relinking this element into the new controller.



Another possible reason for this error:



Bad Outlet.



You have either removed or renamed an outlet name in your .h file.



Remove it in .xib or .storyboard file's Connection Inspector.






share|improve this answer





















  • 7





    Also do not forget to connect the "view" outlet of the nib to the file owner's view outlet (The view outlet of your custom class inherited from UIViewController). This can be done by control dragging from "File's Owner" under "Place Holders" to "view" under "Objects" and selecting the view outlet.

    – Nirma
    Aug 11 '11 at 14:49








  • 1





    I've made sure all the class are already set, but the NSUnknownKeyException still comes out :(

    – Zennichimaro
    Apr 3 '13 at 3:40






  • 1





    I'm not even using Interface Builder, and I'm still getting this error. Any idea what's going on?

    – sudo
    Mar 9 '14 at 7:18






  • 12





    Never mind. It was because of two things: Xcode was still accessing my Main storyboard even though it was removed from the project, and the simulator had it cached. I highly unrecommend using storyboards or NIBs – they're ridiculously problematic.

    – sudo
    Mar 9 '14 at 7:24








  • 5





    @Josh Lol. Everytime I work up the motivation to create a native app in xcode it always ends with me spending a day trying to figure out how to do anything. I'm a c# dev so I've been looking at offerings from Xamarin and Telerik (nativescript) lately.

    – The Muffin Man
    May 13 '15 at 15:02



















1454














You may have a bad connection in your xib.



I've had this error many times. While TechZen's answer is absolutely right in this case, another common cause is when you change the name of a IBOutlet property in your .h/.m which you've already connected up to File's Owner in the nib.



From your nib:




  1. Select the object in IB and go to the 'Connections Inspector'.


  2. Under 'Referencing Outlets' make sure that your object isn't still connected to the old property name... if it is, click the small 'x' to delete the reference and build again.



    example 1




Another common cause if you are using Storyboard, your UIButton might have more then one assignings (Solution is almost the same as for nib):




  1. Open your storyboard and right click the UIButton


  2. You will see that there is more than one assign/ref to this button.
    Remove one of the "Main..." greyed windows with the small "x":



    example 2








share|improve this answer





















  • 1





    Thanks! In my case I had 2 outlets to the same view, and getting rid of the old one and hooking up the view to the new one ended the exception.

    – Mark Patterson
    Feb 3 '14 at 22:31











  • mine was duplicated twice. I began disconnecting each one after i dragged and dropped from a Pro version ( from a Lite version ) thinking it was hanging onto connections in the other project. When i came across the duplicate, and it took 3 clicks to make the disconnection, i sincerely wished i done that 3 days earlier. Oh well- such is the life of a dev.

    – aremvee
    Jan 26 '16 at 4:16











  • I had the problem that UIButton was having more than one assignings. This solved my issue.

    – mythicalcoder
    Apr 17 '16 at 16:07











  • I had this problem too. Don't forget to check outlet connections in particular views instead of only superviews. In my case, superviews weren't showing the wrong connections =/

    – Augusto Carmo
    Sep 19 '16 at 14:29











  • I had a similar error where I connected a button outlet to a the wrong ViewController swift file whose page would not have been created yet using the GUI

    – brw59
    Feb 24 '17 at 23:56



















105














I had to delete the app from the simulator/iPhone to get rid of this error.






share|improve this answer





















  • 1





    +1 this fixed it for me. I was cleaning up some code that used IB. When I deleted a button from the code the error kept popping up even when this button was not referenced at all in the nib files (at least that I could see).

    – SundayMonday
    Sep 26 '12 at 20:34






  • 2





    I find this is necessary if you are debugging two applications that happen to have the same name.

    – Anton
    May 29 '13 at 22:52











  • Yep, it seems that something from the XIB is cached on the simulator, which is a pain if you're testing upgrades since you actually don't want to have to delete the old app.

    – Carlos P
    Jul 31 '13 at 11:14











  • I had this problem deleting my XIB file. This fixed the problem.

    – balboa
    Nov 25 '14 at 17:17






  • 4





    If deleting app does not work, try deleting the XCode DerivedData folder. which can cache an incorrect xib file. Open XCode -> Preferences -> Locations -> Open the DerivedData folder and drag it to Trash.

    – Philip Fung
    Aug 18 '15 at 21:05



















93














I had this error when I was trying to implement a custom ViewCell for a table. When I highlighted View controller for the XIB and connected to the elements in the CellView caused the error " this class is not key value coding-compliant for the key" once I deleted these it got rid of the error.



Delete the connections in the below image.
Delete the connections in inspector when File Owner is highlighted



Just make sure that you only have the connections with the Table View Cell. To check click on table view cell and in INSPECTOR look for your connections.



The connection should be in here when Table View Cell is highlighted






share|improve this answer





















  • 2





    This did it for me, thanks so much. I x'd out the connections when "File's Owner" was selected in the left column, then selected my custom cell and reattached them. Success!

    – Rogare
    Dec 4 '14 at 21:35











  • Even with xcode7 this works, just use the right panel "Connections inspector". Remove the outlet from the tableviewcell and from the label, then re-add it and everything should work.

    – lifeisfoo
    Dec 30 '15 at 8:28











  • This works but you need to make sure FileOwner didn't get set!! File owner should remain NSObject. stackoverflow.com/questions/13793162/…

    – devjme
    Feb 27 '17 at 15:32











  • The same answer saved me twice!

    – wm.p1us
    Aug 20 '18 at 9:23



















66














Sometimes this has to do with your "Inherit From Target" That value has to be set. With single target apps you can just select Inherit From Target. If you have more then one target select the desired target.



enter image description here






share|improve this answer


























  • This answer helped me for a specific case. I have to continu working on an old obj-c project with multiple target. I create a custom UITableViewCell in Swift and I had the same error. By enabling "Inherit From Target" it worked. Thank you!

    – magohamoth
    Apr 11 '17 at 7:59











  • The module is not always set correctly; e.g. if you fill in the class name before actually creating the class.

    – Johan
    Dec 22 '17 at 10:45











  • I have filled the class name without pressing "Enter" key at the end so the IDE didn't checked this flag automatically. Wasted 1 hour on this. Thank you.

    – MatPag
    Aug 17 '18 at 16:20













  • Thanks it worked for me...

    – Vinoth Vino
    Dec 11 '18 at 13:06



















63














If it is an iPhone only app, not a universal one, make sure the following field is empty:



Targets > Summary > iPhone/iPod Deployment Info > Main Interface



If you specify an xib there it crashes.






share|improve this answer





















  • 2





    Yep, that was it for me. While flailing around to add a new startup view controller I set this to the new class/nib. After hooking up the view outlet I was hitting this error. Clearing this field fixed it.

    – terriblememory
    Jul 13 '12 at 23:55











  • This worked for me. Note that I also had to delete the old version from the device/simulator for it to work.

    – jimt
    Oct 16 '12 at 20:57











  • Thanks - this was my problem. I had renamed my iPad storyboard file and did not update in my project's prefs.

    – RobertJoseph
    Dec 17 '12 at 16:35






  • 2





    Thank you! This solved it for me. (I had to delete the app from the simulator after changing the Main Interface field to be empty. Simply changing that field didn't force the simulator to break the cache.)

    – snipe
    Aug 31 '13 at 8:32













  • I remembered that I changed things from a universal app to a iphone only app and this fixed the error!

    – Justin
    Aug 6 '15 at 14:22



















58














This error indicates that an already connected Interface Builder object is removed/renamed in its owner's source (File's Owner).



Control-click on the Files's Owner in the Interface Builder if you see a exclamation mark you need to fix that.



In the picture below you can see that "aRemovedView" has an exclamation mark on its right, that's because I removed the IBOutlet view object while it was already connected in the IB.



enter image description here



This gives the following error:
Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key aRemovedView.'






share|improve this answer


























  • Thank you! This fixed it for me. I've been having this issue for a long time and didn't know how to fix it other than starting over from scratch. This was it, deleted IBOutlets from the view controller, but didn't know they were still referenced/linked in the owner (in this case "View Controller" in interface builder - Xcode 6).

    – Ira Herman
    Oct 1 '14 at 7:01





















40














I had the same problem and while TechZen's answer may indeed be amazing I found it hard to apply to my situation.



Eventually I resolved the issue by linking the label via the Controller listed under Objects (highlighted in the image below) rather then via the File Owner.



Hope this helps.



enter image description here






share|improve this answer

































    35














    in my case it was an error in the storyboard source code, follow these steps:




    1. first open your story board as source code

    2. search for <connections>

    3. remove unwanted connections


    For example:



    <connections>
    <outlet property="mapPostsView" destination="4EV-NK-Bhn" id="ubM-Z6-mwl"/>
    <outlet property="mapView" destination="kx6-TV-oQg" id="4wY-jv-Ih6"/>
    <outlet property="sidebarButton" destination="6UH-BZ-60q" id="8Yz-5G-HpY"/>
    </connections>


    As you see, these are connections between your code variables' names and the storyboard layout xml tags ;)






    share|improve this answer


























    • worked for me :)

      – Navneet Krishna
      Nov 30 '17 at 6:04



















    30














    This was happening to me only when debugging on a device (iPhone). The iOS Simulator was working OK. Doing a "Product->Clean" from Xcode seemed to solve the problem, but I have no idea why.






    share|improve this answer


























    • This solve my problem. tsk2x almost 3 days of headache.

      – user3818576
      Jan 29 '15 at 3:06






    • 5





      It does provide an answer to the question. Something got messed up in Nib and doing a clean solved it. I read and tried all of the above to no avail and then did the clean, and after 1 hour of trying to fix it, Maj's solution fixed it. I would've loved to see what in the XML could've caused this but I've moved on.

      – LevinsonTechnologies
      Apr 8 '15 at 18:47











    • This does indeed solve the issue - I tried numerous suggestions above and only did the project clean fix this error that suddenly started occurring. Ugg...

      – DustinB
      May 12 '15 at 5:03











    • This fix my problem, I tried lot of above suggestions. Seems strange!

      – Naveen Shan
      Dec 29 '15 at 5:30



















    30














    enter image description hereenter image description here



    My fix was similar to Gerard Grundy's. In creating a custom UITableViewCell using an XIB, I had mistakenly applied the Custom Class name to the File's Owner instead of to the UITableViewCell. Applying the class to the UITableViewCell on the canvas and connecting my IBOutlet properties to it solved the issue.






    share|improve this answer


























    • Ayyy dag nab it... Can't believe how often I make this mistake. Thanks lol

      – Benjamin
      May 11 '18 at 14:13



















    28















    1. You only need to specify IBOutlet once, the IBOutlet label your ivar is unnecessary.

    2. Are you instantiating your NIB using your UIViewController? At some point you should be calling [SecondView initWithNibName:@"yourNibName" bundle:nil];






    share|improve this answer


























    • This helped! I was getting a key-value coding compliance error about a property from a different view controller. Turns out I was calling -initWithNibName with the wrong nib name.

      – jlstrecker
      Oct 25 '11 at 18:11











    • Yes this helped me too.. i was using the UIViewController instead of MyCustomeViewController.. but this is kind of hierarchy issue may be.. the introspection failed because of the miss placed class object.. Thank you anyways

      – Futur
      Dec 12 '11 at 5:38













    • I had a similar issue. Two identical IBAction entries by accident. Didn't show in the code, only in the right-click of the UIControl (A UIStepper in my case). Just deleting one fixed it.

      – Dave Hubbard
      Dec 9 '18 at 2:42



















    21














    I had exact same error message and thanks (!!) to Kira from http://www.idev101.com I was able to solve the challenge. I only found her site after googling and stacking over all these threads. I'm now posting here for the next one that comes to StackOverFlow and has the same challenge I had since that person will most likely come to this thread over Google.



    I realized, that I wrongly made this:



    UIViewController *deviceViewController = [[UIViewController alloc] initWithNibName:@"DeviceViewController" bundle:nil];


    Instead of THIS:



    DeviceViewController *deviceViewController = [[DeviceViewController alloc] initWithNibName:@"DeviceViewController" bundle:nil];


    Where



    DeviceViewController


    Was the name of my Class also known as



    DeviceViewController.h 
    DeviceViewController.m


    You'll have to



    "import DeviceViewController.h"


    in your implementation (.m File) where you want to call e.g. another UIViewController.



    I am absolutely not sorry if I am only stating the obvious for beginners like me and may get down votes as this is not exactly related to the question but I was searching 4 (?!?) hours straight now for the answer to these error message. If I can spare this to 1 or 2 people that'd be great :)



    PS: For those interested in how the code continues for loading the other UIViewController:



        [self presentViewController:deviceViewController animated:YES completion:nil];





    share|improve this answer


























    • THANKS for all the steps there, I was using Xcode 5 and didn't really know how to manually add a nib as you can only add storyboard by default.... I got some instructions but non as detailed as yours. Really helped!!

      – Pittfall
      Oct 10 '13 at 20:39





















    21














    It can come from the fact that you have control dragged and created an outlet or action, and forgot to delete it. Even if you deleted the code, or even if you have made enough cmd+Z, you'll need to go in the connection inspector of your storyboard and see if the action or outlet you created is still here or not.






    share|improve this answer


























    • Thanks! I'm a n00b on Xcode and took me a while to find the rogue links. In Xcode 9.2, you can right click on the element in the storyboard view and check the "Referencing outlets".

      – kunigami
      Jan 22 '18 at 7:00



















    16














    Looking over the other answers it seems like there are a lot of things that can cause this error. Here is one more.



    If you




    • have a custom view

    • added an @IBInspectable property

    • and then later deleted it


    Then you may also get an error similar to




    Failed to set (xxx) user defined inspected property on [Your Custom
    View] ...: this class is not key value coding-compliant for the key
    [xxx].




    The solution is to delete the the old property.



    enter image description here



    Open the Identity inspector for your class, select the property name under User Defined Runtime Attributes, and press the minus button (-).






    share|improve this answer

































      15














      This happens to me when my view controller originally had an .xib file, but now is created programmatically.



      Even though I have deleted the .xib file from this project. The users iPhone/iPad may contain an .xib files for this viewcontroller.



      Attempting to load an .xib file usually causes this crash:



      Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIViewController 0x18afe0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key welcomeLabel.'


      Solution when creating it programmatically may be this:



      -(void)loadView {
      // Ensure that we don't load an .xib file for this viewcontroller
      self.view = [UIView new];
      }





      share|improve this answer

































        12














        "Module" property of View Controller in the Identity Inspector might be different than what you expected. Also make sure that new classes are added to your target list.






        share|improve this answer


























        • voting up since it was so in my case. I'm using Swift and Storyboards. When I created a new build target (to make a build variant) the app didn't work in the new variant while the first one worked OK. The app crashed on a View Controller where the module name was somehow set to module from the first target, while in working View Controllers it was Current - <module name here>. You need to erase the module name there in this case.

          – Mixaz
          Apr 26 '16 at 9:58













        • You just saved my life! Thank you so much!!!

          – joliejuly
          Jul 4 '18 at 18:10



















        10














        I had a similar problem for a project that has two targets (with their own MainWindow XIB). The fundamental issue that caused this error for me was that the UIViewController class wasn't included in the second project's resource list. I.e. interface builder allowed me to specify it in MainWindow.xib, but at runtime the system couldn't locate the class.



        I.e. cmd-click on the UIViewController class in question and double-check that it's included in the 'Targets' tab.






        share|improve this answer

































          8














          That might be the case of referencing a component from Xib Interface that you have renamed or delete. Re-referencing works for me.






          share|improve this answer

































            8














            I just had this issue in my duplicated project and solved by checking 2 places:



            1- Make sure you have the .m file in the list -> Project - Build Phases - Compile Sources

            2- After that, go to interface builder (probably this is an error occures with only IB) and unlink all properties, labels, images, etc... Then re-link all. I have realized that I've removed an attribute but it was still linked in IB.



            Hope it works for some.






            share|improve this answer

































              7














              Another "not compliant" issue I found was when I managed to have two copies of a class for some reason.



              I was adding keys to the wrong copy. Interface Builder still saw the keys and let me hook up to them, but at runtime it was using the other copy of the class that didn't have the new keys.



              To find which was the "right" copy I used XCode's cmd-click on the class name elsewhere to jump to the correct copy, then I killed off the bad unused copies (after bringing over my edits from the un-used copy first).



              Moral of the story: duplicate class files are bad.






              share|improve this answer


























              • Updated with project source.

                – Echilon
                May 16 '11 at 17:27



















              7














              This error is something else!



              Here is how i Fixed it. I'm using xcode Version 6.1.1 and using swift. I got this error every time my app tried to perform a segue to jump to the next screen. Here what I did.




              1. Checked that the button was connected to the right action.(This wasn't the problem, but still good to check)

              2. Check that the button does not have any additional actions or outlets that you may have created by mistake. (This wasn't the problem, but still good to check)

              3. Check the logs and make sure that all the buttons in the NEXT SCREEN have the correct actions, and if there are any segues, make sure that they have a unique identifier. (This was the problem)

                • One of the segues did not have a unique identifier

                • One of the buttons had an action and two outlets that I created by mistake.

                • Delete any additional outlets and make sure that you the segues to the next screen have unique identifiers.




              Cheers,






              share|improve this answer

































                7














                Just to add to this, because I was getting this error as well. Going through all these answers most seem to apply to working with the UI and storyboard stuff. I know the original poster did seem to be working with the UI but when searching for possible reasons for this error mostly all questions lead back to this question with those others being closed as duplicates or simply having issues with connecting things in a storyboard so I will add my solution.



                I was working on coding a web service in Swift 2. I had built all the needed proxy objects and stubs. As I looped through the returned XML I was dynamically instantiating my objects, which all came from NSObject and using setValue:forKey on them. Every time setValue:forKey tried to set a property it blew up with this error.



                I had a switch statement for each type I was dealing with (e.g. Bool?, CShort?, String?) and for each XML node I went through and checked what the type was on the object and then converted the value to that type and attempted to set it with setValue:forKey.



                Eventually I started commenting out all these setValue:forKey lines and found that my default switch statement case did work for String?.



                I finally figured out that you can't use optional swift types with setValue:forKey unless they have a direct mapping to an Objective-C type like String? or NSNumber?. I ended up changing all CShort? types to NSNumber? since that has a direct mapping. For Bool? in my case it was fine for me to just use Bool and initialize it to false. Others may not have that luxury.



                Anyway what a headache that was so hopefully this helps someone else who has a similar problem and keeps getting redirected to this question and saying to themselves, "I am not doing anything in UI!!".



                So lastly to reiterate one more time Key-Value Coding does not work with optionals. Below I ended up finding somewhere but I forget where so to whoever posted this I apologize and would give credit if I remembered where I found this but it saved my life:




                You cannot use KVC on an Optional Int property, because KVC is Cocoa /
                Objective-C, and Objective-C cannot see an Optional Int - it is not
                bridged to Objective-C. Objective-C can only see types that are
                bridged to Objective-C:



                class types that are derived from NSObject



                class types that are exposed with @objc



                Swift structs that are bridged







                share|improve this answer

































                  7














                  "this class is not key value coding-compliant for the key"
                  I know its a bit late but my answer is different so I thinks it needs to be posted, I was pushing the second controller in wrong way, Here is sample



                  Wrong Way to Push Controller



                  UIViewController* controller = [[UIViewController
                  alloc]initWithNibName:@"TempViewController" bundle:nil];
                  [self.navigationController pushViewController:controller animated:true];


                  Correct way



                  TempViewController* controller = [[TempViewController
                  alloc]initWithNibName:@"TempViewController" bundle:nil];
                  [self.navigationController pushViewController:controller animated:true];


                  I did not found any answer like above so may be it can help some one having same issue






                  share|improve this answer

































                    6














                    I had the same symptom. The root cause was that the "Target Membership" for my source file was not set to the correct target. I assume that means my class wouldn't get built and included in my app.



                    To correct it:




                    1. Highlight your .m file.

                    2. In the right pane, select the File Inspector.

                    3. Under the "Target Membership" section, make sure the appropriate build target is checked.


                    Hope this helps somebody out there.






                    share|improve this answer

































                      5














                      In my case. I didn't have missing outlets in xib-files after merging.




                      Shift + Command + K




                      solved my problem. I cleaned my project and rebuilt.






                      share|improve this answer

































                        5














                        If you have a custom UIViewController subclass with IBOutlets that are causing problems the only set of steps I found to actually get rid of the error were



                        .1 Change the class to UIViewController



                        .2 Disconnect all the outlets (they will all have the yellow warning triangle now) - it may be enough just to disconnect the problematic outlet(s).



                        .3 Do all the standard steps - ↑⌘K, delete Derived Data (, prayer mats, worry beads)



                        .4 Launch the app - go to the problematic scene.



                        .5 Kill the app, go back to Interface Builder change the class back to your custom class name.



                        .6 Reconnect your outlets.



                        Launch the app & this will normally have cleared up the key-value compliance issues.






                        share|improve this answer

































                          4














                          In my case, this was caused by referencing the wrong Nib:



                          BMTester *viewController = [[BMTester alloc] initWithNibName:@"WrongNibName" bundle:nil];





                          share|improve this answer





















                          • 1





                            Happens to me when I rename the view controller's class and forget that the the nib name needs to change too. Since the nib name is just a string, there's no compiler error.

                            – kris
                            Jul 12 '15 at 21:47



















                          3














                          I was getting this error with storyboards. The above solution didn't seem to be the problem so I ended up deleting the view controller and adding it back in again (and of course reconnecting the segue and reassigning the class) which fixed it. I don't know what it really was, but I had renamed the associated view controller class shortly before this started, so maybe that had hosed something.






                          share|improve this answer


























                          • I got this error again. This time I created a new empty table view controller with my class assigned to it, leaving the non-working one alone, and moved the segue to it. This worked. I then slowly copied every element in the view over until it failed again. This time the problem turned out to be I had assigned some "User Defined Runtime Attributes" for a picker (I was thinking I could use them to initialize the picker so I wouldn't have to do it in code, no idea if that's possible). Removing that fixed the problem. This error is really horrible, I hope it's improved in a future release!

                            – Symmetric
                            Jan 7 '12 at 4:39



















                          3














                          I got the same problem. I did resetting the simulator. Removing and adding button control. and finally made a clean. :) Thanks to stack overflow. Some how my code became ok and starting working.






                          share|improve this answer





























                            1 2
                            3
                            next


                            protected by Brad Larson Apr 16 '14 at 21:28



                            Thank you for your interest in this question.
                            Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



                            Would you like to answer one of these unanswered questions instead?














                            66 Answers
                            66






                            active

                            oldest

                            votes








                            66 Answers
                            66






                            active

                            oldest

                            votes









                            active

                            oldest

                            votes






                            active

                            oldest

                            votes








                            1 2
                            3
                            next










                            870














                            Your view controller may have the wrong class in your xib.



                            I downloaded your project.



                            The error you are getting is




                            'NSUnknownKeyException', reason: '[<UIViewController 0x3927310> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key string.'




                            It is caused by the Second view controller in MainWindow.xib having a class of UIViewController instead of SecondView. Changing to the correct class resolves the problem.



                            By the way, it is bad practice to have names like "string" in Objective-C. It invites a runtime naming collision. Avoid them even in once off practice apps. Naming collisions can be very hard to track down and you don't want to waste the time.



                            Another possible reason for this error: when copying & pasting elements from one controller into another, Xcode somehow keeps that link to the original controller, even after editing & relinking this element into the new controller.



                            Another possible reason for this error:



                            Bad Outlet.



                            You have either removed or renamed an outlet name in your .h file.



                            Remove it in .xib or .storyboard file's Connection Inspector.






                            share|improve this answer





















                            • 7





                              Also do not forget to connect the "view" outlet of the nib to the file owner's view outlet (The view outlet of your custom class inherited from UIViewController). This can be done by control dragging from "File's Owner" under "Place Holders" to "view" under "Objects" and selecting the view outlet.

                              – Nirma
                              Aug 11 '11 at 14:49








                            • 1





                              I've made sure all the class are already set, but the NSUnknownKeyException still comes out :(

                              – Zennichimaro
                              Apr 3 '13 at 3:40






                            • 1





                              I'm not even using Interface Builder, and I'm still getting this error. Any idea what's going on?

                              – sudo
                              Mar 9 '14 at 7:18






                            • 12





                              Never mind. It was because of two things: Xcode was still accessing my Main storyboard even though it was removed from the project, and the simulator had it cached. I highly unrecommend using storyboards or NIBs – they're ridiculously problematic.

                              – sudo
                              Mar 9 '14 at 7:24








                            • 5





                              @Josh Lol. Everytime I work up the motivation to create a native app in xcode it always ends with me spending a day trying to figure out how to do anything. I'm a c# dev so I've been looking at offerings from Xamarin and Telerik (nativescript) lately.

                              – The Muffin Man
                              May 13 '15 at 15:02
















                            870














                            Your view controller may have the wrong class in your xib.



                            I downloaded your project.



                            The error you are getting is




                            'NSUnknownKeyException', reason: '[<UIViewController 0x3927310> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key string.'




                            It is caused by the Second view controller in MainWindow.xib having a class of UIViewController instead of SecondView. Changing to the correct class resolves the problem.



                            By the way, it is bad practice to have names like "string" in Objective-C. It invites a runtime naming collision. Avoid them even in once off practice apps. Naming collisions can be very hard to track down and you don't want to waste the time.



                            Another possible reason for this error: when copying & pasting elements from one controller into another, Xcode somehow keeps that link to the original controller, even after editing & relinking this element into the new controller.



                            Another possible reason for this error:



                            Bad Outlet.



                            You have either removed or renamed an outlet name in your .h file.



                            Remove it in .xib or .storyboard file's Connection Inspector.






                            share|improve this answer





















                            • 7





                              Also do not forget to connect the "view" outlet of the nib to the file owner's view outlet (The view outlet of your custom class inherited from UIViewController). This can be done by control dragging from "File's Owner" under "Place Holders" to "view" under "Objects" and selecting the view outlet.

                              – Nirma
                              Aug 11 '11 at 14:49








                            • 1





                              I've made sure all the class are already set, but the NSUnknownKeyException still comes out :(

                              – Zennichimaro
                              Apr 3 '13 at 3:40






                            • 1





                              I'm not even using Interface Builder, and I'm still getting this error. Any idea what's going on?

                              – sudo
                              Mar 9 '14 at 7:18






                            • 12





                              Never mind. It was because of two things: Xcode was still accessing my Main storyboard even though it was removed from the project, and the simulator had it cached. I highly unrecommend using storyboards or NIBs – they're ridiculously problematic.

                              – sudo
                              Mar 9 '14 at 7:24








                            • 5





                              @Josh Lol. Everytime I work up the motivation to create a native app in xcode it always ends with me spending a day trying to figure out how to do anything. I'm a c# dev so I've been looking at offerings from Xamarin and Telerik (nativescript) lately.

                              – The Muffin Man
                              May 13 '15 at 15:02














                            870












                            870








                            870







                            Your view controller may have the wrong class in your xib.



                            I downloaded your project.



                            The error you are getting is




                            'NSUnknownKeyException', reason: '[<UIViewController 0x3927310> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key string.'




                            It is caused by the Second view controller in MainWindow.xib having a class of UIViewController instead of SecondView. Changing to the correct class resolves the problem.



                            By the way, it is bad practice to have names like "string" in Objective-C. It invites a runtime naming collision. Avoid them even in once off practice apps. Naming collisions can be very hard to track down and you don't want to waste the time.



                            Another possible reason for this error: when copying & pasting elements from one controller into another, Xcode somehow keeps that link to the original controller, even after editing & relinking this element into the new controller.



                            Another possible reason for this error:



                            Bad Outlet.



                            You have either removed or renamed an outlet name in your .h file.



                            Remove it in .xib or .storyboard file's Connection Inspector.






                            share|improve this answer















                            Your view controller may have the wrong class in your xib.



                            I downloaded your project.



                            The error you are getting is




                            'NSUnknownKeyException', reason: '[<UIViewController 0x3927310> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key string.'




                            It is caused by the Second view controller in MainWindow.xib having a class of UIViewController instead of SecondView. Changing to the correct class resolves the problem.



                            By the way, it is bad practice to have names like "string" in Objective-C. It invites a runtime naming collision. Avoid them even in once off practice apps. Naming collisions can be very hard to track down and you don't want to waste the time.



                            Another possible reason for this error: when copying & pasting elements from one controller into another, Xcode somehow keeps that link to the original controller, even after editing & relinking this element into the new controller.



                            Another possible reason for this error:



                            Bad Outlet.



                            You have either removed or renamed an outlet name in your .h file.



                            Remove it in .xib or .storyboard file's Connection Inspector.







                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited Dec 30 '18 at 22:38


























                            community wiki





                            9 revs, 7 users 46%
                            TechZen









                            • 7





                              Also do not forget to connect the "view" outlet of the nib to the file owner's view outlet (The view outlet of your custom class inherited from UIViewController). This can be done by control dragging from "File's Owner" under "Place Holders" to "view" under "Objects" and selecting the view outlet.

                              – Nirma
                              Aug 11 '11 at 14:49








                            • 1





                              I've made sure all the class are already set, but the NSUnknownKeyException still comes out :(

                              – Zennichimaro
                              Apr 3 '13 at 3:40






                            • 1





                              I'm not even using Interface Builder, and I'm still getting this error. Any idea what's going on?

                              – sudo
                              Mar 9 '14 at 7:18






                            • 12





                              Never mind. It was because of two things: Xcode was still accessing my Main storyboard even though it was removed from the project, and the simulator had it cached. I highly unrecommend using storyboards or NIBs – they're ridiculously problematic.

                              – sudo
                              Mar 9 '14 at 7:24








                            • 5





                              @Josh Lol. Everytime I work up the motivation to create a native app in xcode it always ends with me spending a day trying to figure out how to do anything. I'm a c# dev so I've been looking at offerings from Xamarin and Telerik (nativescript) lately.

                              – The Muffin Man
                              May 13 '15 at 15:02














                            • 7





                              Also do not forget to connect the "view" outlet of the nib to the file owner's view outlet (The view outlet of your custom class inherited from UIViewController). This can be done by control dragging from "File's Owner" under "Place Holders" to "view" under "Objects" and selecting the view outlet.

                              – Nirma
                              Aug 11 '11 at 14:49








                            • 1





                              I've made sure all the class are already set, but the NSUnknownKeyException still comes out :(

                              – Zennichimaro
                              Apr 3 '13 at 3:40






                            • 1





                              I'm not even using Interface Builder, and I'm still getting this error. Any idea what's going on?

                              – sudo
                              Mar 9 '14 at 7:18






                            • 12





                              Never mind. It was because of two things: Xcode was still accessing my Main storyboard even though it was removed from the project, and the simulator had it cached. I highly unrecommend using storyboards or NIBs – they're ridiculously problematic.

                              – sudo
                              Mar 9 '14 at 7:24








                            • 5





                              @Josh Lol. Everytime I work up the motivation to create a native app in xcode it always ends with me spending a day trying to figure out how to do anything. I'm a c# dev so I've been looking at offerings from Xamarin and Telerik (nativescript) lately.

                              – The Muffin Man
                              May 13 '15 at 15:02








                            7




                            7





                            Also do not forget to connect the "view" outlet of the nib to the file owner's view outlet (The view outlet of your custom class inherited from UIViewController). This can be done by control dragging from "File's Owner" under "Place Holders" to "view" under "Objects" and selecting the view outlet.

                            – Nirma
                            Aug 11 '11 at 14:49







                            Also do not forget to connect the "view" outlet of the nib to the file owner's view outlet (The view outlet of your custom class inherited from UIViewController). This can be done by control dragging from "File's Owner" under "Place Holders" to "view" under "Objects" and selecting the view outlet.

                            – Nirma
                            Aug 11 '11 at 14:49






                            1




                            1





                            I've made sure all the class are already set, but the NSUnknownKeyException still comes out :(

                            – Zennichimaro
                            Apr 3 '13 at 3:40





                            I've made sure all the class are already set, but the NSUnknownKeyException still comes out :(

                            – Zennichimaro
                            Apr 3 '13 at 3:40




                            1




                            1





                            I'm not even using Interface Builder, and I'm still getting this error. Any idea what's going on?

                            – sudo
                            Mar 9 '14 at 7:18





                            I'm not even using Interface Builder, and I'm still getting this error. Any idea what's going on?

                            – sudo
                            Mar 9 '14 at 7:18




                            12




                            12





                            Never mind. It was because of two things: Xcode was still accessing my Main storyboard even though it was removed from the project, and the simulator had it cached. I highly unrecommend using storyboards or NIBs – they're ridiculously problematic.

                            – sudo
                            Mar 9 '14 at 7:24







                            Never mind. It was because of two things: Xcode was still accessing my Main storyboard even though it was removed from the project, and the simulator had it cached. I highly unrecommend using storyboards or NIBs – they're ridiculously problematic.

                            – sudo
                            Mar 9 '14 at 7:24






                            5




                            5





                            @Josh Lol. Everytime I work up the motivation to create a native app in xcode it always ends with me spending a day trying to figure out how to do anything. I'm a c# dev so I've been looking at offerings from Xamarin and Telerik (nativescript) lately.

                            – The Muffin Man
                            May 13 '15 at 15:02





                            @Josh Lol. Everytime I work up the motivation to create a native app in xcode it always ends with me spending a day trying to figure out how to do anything. I'm a c# dev so I've been looking at offerings from Xamarin and Telerik (nativescript) lately.

                            – The Muffin Man
                            May 13 '15 at 15:02













                            1454














                            You may have a bad connection in your xib.



                            I've had this error many times. While TechZen's answer is absolutely right in this case, another common cause is when you change the name of a IBOutlet property in your .h/.m which you've already connected up to File's Owner in the nib.



                            From your nib:




                            1. Select the object in IB and go to the 'Connections Inspector'.


                            2. Under 'Referencing Outlets' make sure that your object isn't still connected to the old property name... if it is, click the small 'x' to delete the reference and build again.



                              example 1




                            Another common cause if you are using Storyboard, your UIButton might have more then one assignings (Solution is almost the same as for nib):




                            1. Open your storyboard and right click the UIButton


                            2. You will see that there is more than one assign/ref to this button.
                              Remove one of the "Main..." greyed windows with the small "x":



                              example 2








                            share|improve this answer





















                            • 1





                              Thanks! In my case I had 2 outlets to the same view, and getting rid of the old one and hooking up the view to the new one ended the exception.

                              – Mark Patterson
                              Feb 3 '14 at 22:31











                            • mine was duplicated twice. I began disconnecting each one after i dragged and dropped from a Pro version ( from a Lite version ) thinking it was hanging onto connections in the other project. When i came across the duplicate, and it took 3 clicks to make the disconnection, i sincerely wished i done that 3 days earlier. Oh well- such is the life of a dev.

                              – aremvee
                              Jan 26 '16 at 4:16











                            • I had the problem that UIButton was having more than one assignings. This solved my issue.

                              – mythicalcoder
                              Apr 17 '16 at 16:07











                            • I had this problem too. Don't forget to check outlet connections in particular views instead of only superviews. In my case, superviews weren't showing the wrong connections =/

                              – Augusto Carmo
                              Sep 19 '16 at 14:29











                            • I had a similar error where I connected a button outlet to a the wrong ViewController swift file whose page would not have been created yet using the GUI

                              – brw59
                              Feb 24 '17 at 23:56
















                            1454














                            You may have a bad connection in your xib.



                            I've had this error many times. While TechZen's answer is absolutely right in this case, another common cause is when you change the name of a IBOutlet property in your .h/.m which you've already connected up to File's Owner in the nib.



                            From your nib:




                            1. Select the object in IB and go to the 'Connections Inspector'.


                            2. Under 'Referencing Outlets' make sure that your object isn't still connected to the old property name... if it is, click the small 'x' to delete the reference and build again.



                              example 1




                            Another common cause if you are using Storyboard, your UIButton might have more then one assignings (Solution is almost the same as for nib):




                            1. Open your storyboard and right click the UIButton


                            2. You will see that there is more than one assign/ref to this button.
                              Remove one of the "Main..." greyed windows with the small "x":



                              example 2








                            share|improve this answer





















                            • 1





                              Thanks! In my case I had 2 outlets to the same view, and getting rid of the old one and hooking up the view to the new one ended the exception.

                              – Mark Patterson
                              Feb 3 '14 at 22:31











                            • mine was duplicated twice. I began disconnecting each one after i dragged and dropped from a Pro version ( from a Lite version ) thinking it was hanging onto connections in the other project. When i came across the duplicate, and it took 3 clicks to make the disconnection, i sincerely wished i done that 3 days earlier. Oh well- such is the life of a dev.

                              – aremvee
                              Jan 26 '16 at 4:16











                            • I had the problem that UIButton was having more than one assignings. This solved my issue.

                              – mythicalcoder
                              Apr 17 '16 at 16:07











                            • I had this problem too. Don't forget to check outlet connections in particular views instead of only superviews. In my case, superviews weren't showing the wrong connections =/

                              – Augusto Carmo
                              Sep 19 '16 at 14:29











                            • I had a similar error where I connected a button outlet to a the wrong ViewController swift file whose page would not have been created yet using the GUI

                              – brw59
                              Feb 24 '17 at 23:56














                            1454












                            1454








                            1454







                            You may have a bad connection in your xib.



                            I've had this error many times. While TechZen's answer is absolutely right in this case, another common cause is when you change the name of a IBOutlet property in your .h/.m which you've already connected up to File's Owner in the nib.



                            From your nib:




                            1. Select the object in IB and go to the 'Connections Inspector'.


                            2. Under 'Referencing Outlets' make sure that your object isn't still connected to the old property name... if it is, click the small 'x' to delete the reference and build again.



                              example 1




                            Another common cause if you are using Storyboard, your UIButton might have more then one assignings (Solution is almost the same as for nib):




                            1. Open your storyboard and right click the UIButton


                            2. You will see that there is more than one assign/ref to this button.
                              Remove one of the "Main..." greyed windows with the small "x":



                              example 2








                            share|improve this answer















                            You may have a bad connection in your xib.



                            I've had this error many times. While TechZen's answer is absolutely right in this case, another common cause is when you change the name of a IBOutlet property in your .h/.m which you've already connected up to File's Owner in the nib.



                            From your nib:




                            1. Select the object in IB and go to the 'Connections Inspector'.


                            2. Under 'Referencing Outlets' make sure that your object isn't still connected to the old property name... if it is, click the small 'x' to delete the reference and build again.



                              example 1




                            Another common cause if you are using Storyboard, your UIButton might have more then one assignings (Solution is almost the same as for nib):




                            1. Open your storyboard and right click the UIButton


                            2. You will see that there is more than one assign/ref to this button.
                              Remove one of the "Main..." greyed windows with the small "x":



                              example 2









                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited Oct 21 '16 at 7:29


























                            community wiki





                            6 revs, 5 users 39%
                            OhadM









                            • 1





                              Thanks! In my case I had 2 outlets to the same view, and getting rid of the old one and hooking up the view to the new one ended the exception.

                              – Mark Patterson
                              Feb 3 '14 at 22:31











                            • mine was duplicated twice. I began disconnecting each one after i dragged and dropped from a Pro version ( from a Lite version ) thinking it was hanging onto connections in the other project. When i came across the duplicate, and it took 3 clicks to make the disconnection, i sincerely wished i done that 3 days earlier. Oh well- such is the life of a dev.

                              – aremvee
                              Jan 26 '16 at 4:16











                            • I had the problem that UIButton was having more than one assignings. This solved my issue.

                              – mythicalcoder
                              Apr 17 '16 at 16:07











                            • I had this problem too. Don't forget to check outlet connections in particular views instead of only superviews. In my case, superviews weren't showing the wrong connections =/

                              – Augusto Carmo
                              Sep 19 '16 at 14:29











                            • I had a similar error where I connected a button outlet to a the wrong ViewController swift file whose page would not have been created yet using the GUI

                              – brw59
                              Feb 24 '17 at 23:56














                            • 1





                              Thanks! In my case I had 2 outlets to the same view, and getting rid of the old one and hooking up the view to the new one ended the exception.

                              – Mark Patterson
                              Feb 3 '14 at 22:31











                            • mine was duplicated twice. I began disconnecting each one after i dragged and dropped from a Pro version ( from a Lite version ) thinking it was hanging onto connections in the other project. When i came across the duplicate, and it took 3 clicks to make the disconnection, i sincerely wished i done that 3 days earlier. Oh well- such is the life of a dev.

                              – aremvee
                              Jan 26 '16 at 4:16











                            • I had the problem that UIButton was having more than one assignings. This solved my issue.

                              – mythicalcoder
                              Apr 17 '16 at 16:07











                            • I had this problem too. Don't forget to check outlet connections in particular views instead of only superviews. In my case, superviews weren't showing the wrong connections =/

                              – Augusto Carmo
                              Sep 19 '16 at 14:29











                            • I had a similar error where I connected a button outlet to a the wrong ViewController swift file whose page would not have been created yet using the GUI

                              – brw59
                              Feb 24 '17 at 23:56








                            1




                            1





                            Thanks! In my case I had 2 outlets to the same view, and getting rid of the old one and hooking up the view to the new one ended the exception.

                            – Mark Patterson
                            Feb 3 '14 at 22:31





                            Thanks! In my case I had 2 outlets to the same view, and getting rid of the old one and hooking up the view to the new one ended the exception.

                            – Mark Patterson
                            Feb 3 '14 at 22:31













                            mine was duplicated twice. I began disconnecting each one after i dragged and dropped from a Pro version ( from a Lite version ) thinking it was hanging onto connections in the other project. When i came across the duplicate, and it took 3 clicks to make the disconnection, i sincerely wished i done that 3 days earlier. Oh well- such is the life of a dev.

                            – aremvee
                            Jan 26 '16 at 4:16





                            mine was duplicated twice. I began disconnecting each one after i dragged and dropped from a Pro version ( from a Lite version ) thinking it was hanging onto connections in the other project. When i came across the duplicate, and it took 3 clicks to make the disconnection, i sincerely wished i done that 3 days earlier. Oh well- such is the life of a dev.

                            – aremvee
                            Jan 26 '16 at 4:16













                            I had the problem that UIButton was having more than one assignings. This solved my issue.

                            – mythicalcoder
                            Apr 17 '16 at 16:07





                            I had the problem that UIButton was having more than one assignings. This solved my issue.

                            – mythicalcoder
                            Apr 17 '16 at 16:07













                            I had this problem too. Don't forget to check outlet connections in particular views instead of only superviews. In my case, superviews weren't showing the wrong connections =/

                            – Augusto Carmo
                            Sep 19 '16 at 14:29





                            I had this problem too. Don't forget to check outlet connections in particular views instead of only superviews. In my case, superviews weren't showing the wrong connections =/

                            – Augusto Carmo
                            Sep 19 '16 at 14:29













                            I had a similar error where I connected a button outlet to a the wrong ViewController swift file whose page would not have been created yet using the GUI

                            – brw59
                            Feb 24 '17 at 23:56





                            I had a similar error where I connected a button outlet to a the wrong ViewController swift file whose page would not have been created yet using the GUI

                            – brw59
                            Feb 24 '17 at 23:56











                            105














                            I had to delete the app from the simulator/iPhone to get rid of this error.






                            share|improve this answer





















                            • 1





                              +1 this fixed it for me. I was cleaning up some code that used IB. When I deleted a button from the code the error kept popping up even when this button was not referenced at all in the nib files (at least that I could see).

                              – SundayMonday
                              Sep 26 '12 at 20:34






                            • 2





                              I find this is necessary if you are debugging two applications that happen to have the same name.

                              – Anton
                              May 29 '13 at 22:52











                            • Yep, it seems that something from the XIB is cached on the simulator, which is a pain if you're testing upgrades since you actually don't want to have to delete the old app.

                              – Carlos P
                              Jul 31 '13 at 11:14











                            • I had this problem deleting my XIB file. This fixed the problem.

                              – balboa
                              Nov 25 '14 at 17:17






                            • 4





                              If deleting app does not work, try deleting the XCode DerivedData folder. which can cache an incorrect xib file. Open XCode -> Preferences -> Locations -> Open the DerivedData folder and drag it to Trash.

                              – Philip Fung
                              Aug 18 '15 at 21:05
















                            105














                            I had to delete the app from the simulator/iPhone to get rid of this error.






                            share|improve this answer





















                            • 1





                              +1 this fixed it for me. I was cleaning up some code that used IB. When I deleted a button from the code the error kept popping up even when this button was not referenced at all in the nib files (at least that I could see).

                              – SundayMonday
                              Sep 26 '12 at 20:34






                            • 2





                              I find this is necessary if you are debugging two applications that happen to have the same name.

                              – Anton
                              May 29 '13 at 22:52











                            • Yep, it seems that something from the XIB is cached on the simulator, which is a pain if you're testing upgrades since you actually don't want to have to delete the old app.

                              – Carlos P
                              Jul 31 '13 at 11:14











                            • I had this problem deleting my XIB file. This fixed the problem.

                              – balboa
                              Nov 25 '14 at 17:17






                            • 4





                              If deleting app does not work, try deleting the XCode DerivedData folder. which can cache an incorrect xib file. Open XCode -> Preferences -> Locations -> Open the DerivedData folder and drag it to Trash.

                              – Philip Fung
                              Aug 18 '15 at 21:05














                            105












                            105








                            105







                            I had to delete the app from the simulator/iPhone to get rid of this error.






                            share|improve this answer















                            I had to delete the app from the simulator/iPhone to get rid of this error.







                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            answered Jan 9 '12 at 5:32


























                            community wiki





                            Steve Rogers









                            • 1





                              +1 this fixed it for me. I was cleaning up some code that used IB. When I deleted a button from the code the error kept popping up even when this button was not referenced at all in the nib files (at least that I could see).

                              – SundayMonday
                              Sep 26 '12 at 20:34






                            • 2





                              I find this is necessary if you are debugging two applications that happen to have the same name.

                              – Anton
                              May 29 '13 at 22:52











                            • Yep, it seems that something from the XIB is cached on the simulator, which is a pain if you're testing upgrades since you actually don't want to have to delete the old app.

                              – Carlos P
                              Jul 31 '13 at 11:14











                            • I had this problem deleting my XIB file. This fixed the problem.

                              – balboa
                              Nov 25 '14 at 17:17






                            • 4





                              If deleting app does not work, try deleting the XCode DerivedData folder. which can cache an incorrect xib file. Open XCode -> Preferences -> Locations -> Open the DerivedData folder and drag it to Trash.

                              – Philip Fung
                              Aug 18 '15 at 21:05














                            • 1





                              +1 this fixed it for me. I was cleaning up some code that used IB. When I deleted a button from the code the error kept popping up even when this button was not referenced at all in the nib files (at least that I could see).

                              – SundayMonday
                              Sep 26 '12 at 20:34






                            • 2





                              I find this is necessary if you are debugging two applications that happen to have the same name.

                              – Anton
                              May 29 '13 at 22:52











                            • Yep, it seems that something from the XIB is cached on the simulator, which is a pain if you're testing upgrades since you actually don't want to have to delete the old app.

                              – Carlos P
                              Jul 31 '13 at 11:14











                            • I had this problem deleting my XIB file. This fixed the problem.

                              – balboa
                              Nov 25 '14 at 17:17






                            • 4





                              If deleting app does not work, try deleting the XCode DerivedData folder. which can cache an incorrect xib file. Open XCode -> Preferences -> Locations -> Open the DerivedData folder and drag it to Trash.

                              – Philip Fung
                              Aug 18 '15 at 21:05








                            1




                            1





                            +1 this fixed it for me. I was cleaning up some code that used IB. When I deleted a button from the code the error kept popping up even when this button was not referenced at all in the nib files (at least that I could see).

                            – SundayMonday
                            Sep 26 '12 at 20:34





                            +1 this fixed it for me. I was cleaning up some code that used IB. When I deleted a button from the code the error kept popping up even when this button was not referenced at all in the nib files (at least that I could see).

                            – SundayMonday
                            Sep 26 '12 at 20:34




                            2




                            2





                            I find this is necessary if you are debugging two applications that happen to have the same name.

                            – Anton
                            May 29 '13 at 22:52





                            I find this is necessary if you are debugging two applications that happen to have the same name.

                            – Anton
                            May 29 '13 at 22:52













                            Yep, it seems that something from the XIB is cached on the simulator, which is a pain if you're testing upgrades since you actually don't want to have to delete the old app.

                            – Carlos P
                            Jul 31 '13 at 11:14





                            Yep, it seems that something from the XIB is cached on the simulator, which is a pain if you're testing upgrades since you actually don't want to have to delete the old app.

                            – Carlos P
                            Jul 31 '13 at 11:14













                            I had this problem deleting my XIB file. This fixed the problem.

                            – balboa
                            Nov 25 '14 at 17:17





                            I had this problem deleting my XIB file. This fixed the problem.

                            – balboa
                            Nov 25 '14 at 17:17




                            4




                            4





                            If deleting app does not work, try deleting the XCode DerivedData folder. which can cache an incorrect xib file. Open XCode -> Preferences -> Locations -> Open the DerivedData folder and drag it to Trash.

                            – Philip Fung
                            Aug 18 '15 at 21:05





                            If deleting app does not work, try deleting the XCode DerivedData folder. which can cache an incorrect xib file. Open XCode -> Preferences -> Locations -> Open the DerivedData folder and drag it to Trash.

                            – Philip Fung
                            Aug 18 '15 at 21:05











                            93














                            I had this error when I was trying to implement a custom ViewCell for a table. When I highlighted View controller for the XIB and connected to the elements in the CellView caused the error " this class is not key value coding-compliant for the key" once I deleted these it got rid of the error.



                            Delete the connections in the below image.
                            Delete the connections in inspector when File Owner is highlighted



                            Just make sure that you only have the connections with the Table View Cell. To check click on table view cell and in INSPECTOR look for your connections.



                            The connection should be in here when Table View Cell is highlighted






                            share|improve this answer





















                            • 2





                              This did it for me, thanks so much. I x'd out the connections when "File's Owner" was selected in the left column, then selected my custom cell and reattached them. Success!

                              – Rogare
                              Dec 4 '14 at 21:35











                            • Even with xcode7 this works, just use the right panel "Connections inspector". Remove the outlet from the tableviewcell and from the label, then re-add it and everything should work.

                              – lifeisfoo
                              Dec 30 '15 at 8:28











                            • This works but you need to make sure FileOwner didn't get set!! File owner should remain NSObject. stackoverflow.com/questions/13793162/…

                              – devjme
                              Feb 27 '17 at 15:32











                            • The same answer saved me twice!

                              – wm.p1us
                              Aug 20 '18 at 9:23
















                            93














                            I had this error when I was trying to implement a custom ViewCell for a table. When I highlighted View controller for the XIB and connected to the elements in the CellView caused the error " this class is not key value coding-compliant for the key" once I deleted these it got rid of the error.



                            Delete the connections in the below image.
                            Delete the connections in inspector when File Owner is highlighted



                            Just make sure that you only have the connections with the Table View Cell. To check click on table view cell and in INSPECTOR look for your connections.



                            The connection should be in here when Table View Cell is highlighted






                            share|improve this answer





















                            • 2





                              This did it for me, thanks so much. I x'd out the connections when "File's Owner" was selected in the left column, then selected my custom cell and reattached them. Success!

                              – Rogare
                              Dec 4 '14 at 21:35











                            • Even with xcode7 this works, just use the right panel "Connections inspector". Remove the outlet from the tableviewcell and from the label, then re-add it and everything should work.

                              – lifeisfoo
                              Dec 30 '15 at 8:28











                            • This works but you need to make sure FileOwner didn't get set!! File owner should remain NSObject. stackoverflow.com/questions/13793162/…

                              – devjme
                              Feb 27 '17 at 15:32











                            • The same answer saved me twice!

                              – wm.p1us
                              Aug 20 '18 at 9:23














                            93












                            93








                            93







                            I had this error when I was trying to implement a custom ViewCell for a table. When I highlighted View controller for the XIB and connected to the elements in the CellView caused the error " this class is not key value coding-compliant for the key" once I deleted these it got rid of the error.



                            Delete the connections in the below image.
                            Delete the connections in inspector when File Owner is highlighted



                            Just make sure that you only have the connections with the Table View Cell. To check click on table view cell and in INSPECTOR look for your connections.



                            The connection should be in here when Table View Cell is highlighted






                            share|improve this answer















                            I had this error when I was trying to implement a custom ViewCell for a table. When I highlighted View controller for the XIB and connected to the elements in the CellView caused the error " this class is not key value coding-compliant for the key" once I deleted these it got rid of the error.



                            Delete the connections in the below image.
                            Delete the connections in inspector when File Owner is highlighted



                            Just make sure that you only have the connections with the Table View Cell. To check click on table view cell and in INSPECTOR look for your connections.



                            The connection should be in here when Table View Cell is highlighted







                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            answered Nov 21 '13 at 21:58


























                            community wiki





                            uplearnedu.com









                            • 2





                              This did it for me, thanks so much. I x'd out the connections when "File's Owner" was selected in the left column, then selected my custom cell and reattached them. Success!

                              – Rogare
                              Dec 4 '14 at 21:35











                            • Even with xcode7 this works, just use the right panel "Connections inspector". Remove the outlet from the tableviewcell and from the label, then re-add it and everything should work.

                              – lifeisfoo
                              Dec 30 '15 at 8:28











                            • This works but you need to make sure FileOwner didn't get set!! File owner should remain NSObject. stackoverflow.com/questions/13793162/…

                              – devjme
                              Feb 27 '17 at 15:32











                            • The same answer saved me twice!

                              – wm.p1us
                              Aug 20 '18 at 9:23














                            • 2





                              This did it for me, thanks so much. I x'd out the connections when "File's Owner" was selected in the left column, then selected my custom cell and reattached them. Success!

                              – Rogare
                              Dec 4 '14 at 21:35











                            • Even with xcode7 this works, just use the right panel "Connections inspector". Remove the outlet from the tableviewcell and from the label, then re-add it and everything should work.

                              – lifeisfoo
                              Dec 30 '15 at 8:28











                            • This works but you need to make sure FileOwner didn't get set!! File owner should remain NSObject. stackoverflow.com/questions/13793162/…

                              – devjme
                              Feb 27 '17 at 15:32











                            • The same answer saved me twice!

                              – wm.p1us
                              Aug 20 '18 at 9:23








                            2




                            2





                            This did it for me, thanks so much. I x'd out the connections when "File's Owner" was selected in the left column, then selected my custom cell and reattached them. Success!

                            – Rogare
                            Dec 4 '14 at 21:35





                            This did it for me, thanks so much. I x'd out the connections when "File's Owner" was selected in the left column, then selected my custom cell and reattached them. Success!

                            – Rogare
                            Dec 4 '14 at 21:35













                            Even with xcode7 this works, just use the right panel "Connections inspector". Remove the outlet from the tableviewcell and from the label, then re-add it and everything should work.

                            – lifeisfoo
                            Dec 30 '15 at 8:28





                            Even with xcode7 this works, just use the right panel "Connections inspector". Remove the outlet from the tableviewcell and from the label, then re-add it and everything should work.

                            – lifeisfoo
                            Dec 30 '15 at 8:28













                            This works but you need to make sure FileOwner didn't get set!! File owner should remain NSObject. stackoverflow.com/questions/13793162/…

                            – devjme
                            Feb 27 '17 at 15:32





                            This works but you need to make sure FileOwner didn't get set!! File owner should remain NSObject. stackoverflow.com/questions/13793162/…

                            – devjme
                            Feb 27 '17 at 15:32













                            The same answer saved me twice!

                            – wm.p1us
                            Aug 20 '18 at 9:23





                            The same answer saved me twice!

                            – wm.p1us
                            Aug 20 '18 at 9:23











                            66














                            Sometimes this has to do with your "Inherit From Target" That value has to be set. With single target apps you can just select Inherit From Target. If you have more then one target select the desired target.



                            enter image description here






                            share|improve this answer


























                            • This answer helped me for a specific case. I have to continu working on an old obj-c project with multiple target. I create a custom UITableViewCell in Swift and I had the same error. By enabling "Inherit From Target" it worked. Thank you!

                              – magohamoth
                              Apr 11 '17 at 7:59











                            • The module is not always set correctly; e.g. if you fill in the class name before actually creating the class.

                              – Johan
                              Dec 22 '17 at 10:45











                            • I have filled the class name without pressing "Enter" key at the end so the IDE didn't checked this flag automatically. Wasted 1 hour on this. Thank you.

                              – MatPag
                              Aug 17 '18 at 16:20













                            • Thanks it worked for me...

                              – Vinoth Vino
                              Dec 11 '18 at 13:06
















                            66














                            Sometimes this has to do with your "Inherit From Target" That value has to be set. With single target apps you can just select Inherit From Target. If you have more then one target select the desired target.



                            enter image description here






                            share|improve this answer


























                            • This answer helped me for a specific case. I have to continu working on an old obj-c project with multiple target. I create a custom UITableViewCell in Swift and I had the same error. By enabling "Inherit From Target" it worked. Thank you!

                              – magohamoth
                              Apr 11 '17 at 7:59











                            • The module is not always set correctly; e.g. if you fill in the class name before actually creating the class.

                              – Johan
                              Dec 22 '17 at 10:45











                            • I have filled the class name without pressing "Enter" key at the end so the IDE didn't checked this flag automatically. Wasted 1 hour on this. Thank you.

                              – MatPag
                              Aug 17 '18 at 16:20













                            • Thanks it worked for me...

                              – Vinoth Vino
                              Dec 11 '18 at 13:06














                            66












                            66








                            66







                            Sometimes this has to do with your "Inherit From Target" That value has to be set. With single target apps you can just select Inherit From Target. If you have more then one target select the desired target.



                            enter image description here






                            share|improve this answer















                            Sometimes this has to do with your "Inherit From Target" That value has to be set. With single target apps you can just select Inherit From Target. If you have more then one target select the desired target.



                            enter image description here







                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited Oct 10 '18 at 5:52


























                            community wiki





                            3 revs, 3 users 38%
                            Shruti Thombre














                            • This answer helped me for a specific case. I have to continu working on an old obj-c project with multiple target. I create a custom UITableViewCell in Swift and I had the same error. By enabling "Inherit From Target" it worked. Thank you!

                              – magohamoth
                              Apr 11 '17 at 7:59











                            • The module is not always set correctly; e.g. if you fill in the class name before actually creating the class.

                              – Johan
                              Dec 22 '17 at 10:45











                            • I have filled the class name without pressing "Enter" key at the end so the IDE didn't checked this flag automatically. Wasted 1 hour on this. Thank you.

                              – MatPag
                              Aug 17 '18 at 16:20













                            • Thanks it worked for me...

                              – Vinoth Vino
                              Dec 11 '18 at 13:06



















                            • This answer helped me for a specific case. I have to continu working on an old obj-c project with multiple target. I create a custom UITableViewCell in Swift and I had the same error. By enabling "Inherit From Target" it worked. Thank you!

                              – magohamoth
                              Apr 11 '17 at 7:59











                            • The module is not always set correctly; e.g. if you fill in the class name before actually creating the class.

                              – Johan
                              Dec 22 '17 at 10:45











                            • I have filled the class name without pressing "Enter" key at the end so the IDE didn't checked this flag automatically. Wasted 1 hour on this. Thank you.

                              – MatPag
                              Aug 17 '18 at 16:20













                            • Thanks it worked for me...

                              – Vinoth Vino
                              Dec 11 '18 at 13:06

















                            This answer helped me for a specific case. I have to continu working on an old obj-c project with multiple target. I create a custom UITableViewCell in Swift and I had the same error. By enabling "Inherit From Target" it worked. Thank you!

                            – magohamoth
                            Apr 11 '17 at 7:59





                            This answer helped me for a specific case. I have to continu working on an old obj-c project with multiple target. I create a custom UITableViewCell in Swift and I had the same error. By enabling "Inherit From Target" it worked. Thank you!

                            – magohamoth
                            Apr 11 '17 at 7:59













                            The module is not always set correctly; e.g. if you fill in the class name before actually creating the class.

                            – Johan
                            Dec 22 '17 at 10:45





                            The module is not always set correctly; e.g. if you fill in the class name before actually creating the class.

                            – Johan
                            Dec 22 '17 at 10:45













                            I have filled the class name without pressing "Enter" key at the end so the IDE didn't checked this flag automatically. Wasted 1 hour on this. Thank you.

                            – MatPag
                            Aug 17 '18 at 16:20







                            I have filled the class name without pressing "Enter" key at the end so the IDE didn't checked this flag automatically. Wasted 1 hour on this. Thank you.

                            – MatPag
                            Aug 17 '18 at 16:20















                            Thanks it worked for me...

                            – Vinoth Vino
                            Dec 11 '18 at 13:06





                            Thanks it worked for me...

                            – Vinoth Vino
                            Dec 11 '18 at 13:06











                            63














                            If it is an iPhone only app, not a universal one, make sure the following field is empty:



                            Targets > Summary > iPhone/iPod Deployment Info > Main Interface



                            If you specify an xib there it crashes.






                            share|improve this answer





















                            • 2





                              Yep, that was it for me. While flailing around to add a new startup view controller I set this to the new class/nib. After hooking up the view outlet I was hitting this error. Clearing this field fixed it.

                              – terriblememory
                              Jul 13 '12 at 23:55











                            • This worked for me. Note that I also had to delete the old version from the device/simulator for it to work.

                              – jimt
                              Oct 16 '12 at 20:57











                            • Thanks - this was my problem. I had renamed my iPad storyboard file and did not update in my project's prefs.

                              – RobertJoseph
                              Dec 17 '12 at 16:35






                            • 2





                              Thank you! This solved it for me. (I had to delete the app from the simulator after changing the Main Interface field to be empty. Simply changing that field didn't force the simulator to break the cache.)

                              – snipe
                              Aug 31 '13 at 8:32













                            • I remembered that I changed things from a universal app to a iphone only app and this fixed the error!

                              – Justin
                              Aug 6 '15 at 14:22
















                            63














                            If it is an iPhone only app, not a universal one, make sure the following field is empty:



                            Targets > Summary > iPhone/iPod Deployment Info > Main Interface



                            If you specify an xib there it crashes.






                            share|improve this answer





















                            • 2





                              Yep, that was it for me. While flailing around to add a new startup view controller I set this to the new class/nib. After hooking up the view outlet I was hitting this error. Clearing this field fixed it.

                              – terriblememory
                              Jul 13 '12 at 23:55











                            • This worked for me. Note that I also had to delete the old version from the device/simulator for it to work.

                              – jimt
                              Oct 16 '12 at 20:57











                            • Thanks - this was my problem. I had renamed my iPad storyboard file and did not update in my project's prefs.

                              – RobertJoseph
                              Dec 17 '12 at 16:35






                            • 2





                              Thank you! This solved it for me. (I had to delete the app from the simulator after changing the Main Interface field to be empty. Simply changing that field didn't force the simulator to break the cache.)

                              – snipe
                              Aug 31 '13 at 8:32













                            • I remembered that I changed things from a universal app to a iphone only app and this fixed the error!

                              – Justin
                              Aug 6 '15 at 14:22














                            63












                            63








                            63







                            If it is an iPhone only app, not a universal one, make sure the following field is empty:



                            Targets > Summary > iPhone/iPod Deployment Info > Main Interface



                            If you specify an xib there it crashes.






                            share|improve this answer















                            If it is an iPhone only app, not a universal one, make sure the following field is empty:



                            Targets > Summary > iPhone/iPod Deployment Info > Main Interface



                            If you specify an xib there it crashes.







                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            answered Jun 30 '12 at 13:00


























                            community wiki





                            erkanyildiz









                            • 2





                              Yep, that was it for me. While flailing around to add a new startup view controller I set this to the new class/nib. After hooking up the view outlet I was hitting this error. Clearing this field fixed it.

                              – terriblememory
                              Jul 13 '12 at 23:55











                            • This worked for me. Note that I also had to delete the old version from the device/simulator for it to work.

                              – jimt
                              Oct 16 '12 at 20:57











                            • Thanks - this was my problem. I had renamed my iPad storyboard file and did not update in my project's prefs.

                              – RobertJoseph
                              Dec 17 '12 at 16:35






                            • 2





                              Thank you! This solved it for me. (I had to delete the app from the simulator after changing the Main Interface field to be empty. Simply changing that field didn't force the simulator to break the cache.)

                              – snipe
                              Aug 31 '13 at 8:32













                            • I remembered that I changed things from a universal app to a iphone only app and this fixed the error!

                              – Justin
                              Aug 6 '15 at 14:22














                            • 2





                              Yep, that was it for me. While flailing around to add a new startup view controller I set this to the new class/nib. After hooking up the view outlet I was hitting this error. Clearing this field fixed it.

                              – terriblememory
                              Jul 13 '12 at 23:55











                            • This worked for me. Note that I also had to delete the old version from the device/simulator for it to work.

                              – jimt
                              Oct 16 '12 at 20:57











                            • Thanks - this was my problem. I had renamed my iPad storyboard file and did not update in my project's prefs.

                              – RobertJoseph
                              Dec 17 '12 at 16:35






                            • 2





                              Thank you! This solved it for me. (I had to delete the app from the simulator after changing the Main Interface field to be empty. Simply changing that field didn't force the simulator to break the cache.)

                              – snipe
                              Aug 31 '13 at 8:32













                            • I remembered that I changed things from a universal app to a iphone only app and this fixed the error!

                              – Justin
                              Aug 6 '15 at 14:22








                            2




                            2





                            Yep, that was it for me. While flailing around to add a new startup view controller I set this to the new class/nib. After hooking up the view outlet I was hitting this error. Clearing this field fixed it.

                            – terriblememory
                            Jul 13 '12 at 23:55





                            Yep, that was it for me. While flailing around to add a new startup view controller I set this to the new class/nib. After hooking up the view outlet I was hitting this error. Clearing this field fixed it.

                            – terriblememory
                            Jul 13 '12 at 23:55













                            This worked for me. Note that I also had to delete the old version from the device/simulator for it to work.

                            – jimt
                            Oct 16 '12 at 20:57





                            This worked for me. Note that I also had to delete the old version from the device/simulator for it to work.

                            – jimt
                            Oct 16 '12 at 20:57













                            Thanks - this was my problem. I had renamed my iPad storyboard file and did not update in my project's prefs.

                            – RobertJoseph
                            Dec 17 '12 at 16:35





                            Thanks - this was my problem. I had renamed my iPad storyboard file and did not update in my project's prefs.

                            – RobertJoseph
                            Dec 17 '12 at 16:35




                            2




                            2





                            Thank you! This solved it for me. (I had to delete the app from the simulator after changing the Main Interface field to be empty. Simply changing that field didn't force the simulator to break the cache.)

                            – snipe
                            Aug 31 '13 at 8:32







                            Thank you! This solved it for me. (I had to delete the app from the simulator after changing the Main Interface field to be empty. Simply changing that field didn't force the simulator to break the cache.)

                            – snipe
                            Aug 31 '13 at 8:32















                            I remembered that I changed things from a universal app to a iphone only app and this fixed the error!

                            – Justin
                            Aug 6 '15 at 14:22





                            I remembered that I changed things from a universal app to a iphone only app and this fixed the error!

                            – Justin
                            Aug 6 '15 at 14:22











                            58














                            This error indicates that an already connected Interface Builder object is removed/renamed in its owner's source (File's Owner).



                            Control-click on the Files's Owner in the Interface Builder if you see a exclamation mark you need to fix that.



                            In the picture below you can see that "aRemovedView" has an exclamation mark on its right, that's because I removed the IBOutlet view object while it was already connected in the IB.



                            enter image description here



                            This gives the following error:
                            Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key aRemovedView.'






                            share|improve this answer


























                            • Thank you! This fixed it for me. I've been having this issue for a long time and didn't know how to fix it other than starting over from scratch. This was it, deleted IBOutlets from the view controller, but didn't know they were still referenced/linked in the owner (in this case "View Controller" in interface builder - Xcode 6).

                              – Ira Herman
                              Oct 1 '14 at 7:01


















                            58














                            This error indicates that an already connected Interface Builder object is removed/renamed in its owner's source (File's Owner).



                            Control-click on the Files's Owner in the Interface Builder if you see a exclamation mark you need to fix that.



                            In the picture below you can see that "aRemovedView" has an exclamation mark on its right, that's because I removed the IBOutlet view object while it was already connected in the IB.



                            enter image description here



                            This gives the following error:
                            Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key aRemovedView.'






                            share|improve this answer


























                            • Thank you! This fixed it for me. I've been having this issue for a long time and didn't know how to fix it other than starting over from scratch. This was it, deleted IBOutlets from the view controller, but didn't know they were still referenced/linked in the owner (in this case "View Controller" in interface builder - Xcode 6).

                              – Ira Herman
                              Oct 1 '14 at 7:01
















                            58












                            58








                            58







                            This error indicates that an already connected Interface Builder object is removed/renamed in its owner's source (File's Owner).



                            Control-click on the Files's Owner in the Interface Builder if you see a exclamation mark you need to fix that.



                            In the picture below you can see that "aRemovedView" has an exclamation mark on its right, that's because I removed the IBOutlet view object while it was already connected in the IB.



                            enter image description here



                            This gives the following error:
                            Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key aRemovedView.'






                            share|improve this answer















                            This error indicates that an already connected Interface Builder object is removed/renamed in its owner's source (File's Owner).



                            Control-click on the Files's Owner in the Interface Builder if you see a exclamation mark you need to fix that.



                            In the picture below you can see that "aRemovedView" has an exclamation mark on its right, that's because I removed the IBOutlet view object while it was already connected in the IB.



                            enter image description here



                            This gives the following error:
                            Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key aRemovedView.'







                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited Jul 31 '13 at 3:34


























                            community wiki





                            Tibidabo














                            • Thank you! This fixed it for me. I've been having this issue for a long time and didn't know how to fix it other than starting over from scratch. This was it, deleted IBOutlets from the view controller, but didn't know they were still referenced/linked in the owner (in this case "View Controller" in interface builder - Xcode 6).

                              – Ira Herman
                              Oct 1 '14 at 7:01





















                            • Thank you! This fixed it for me. I've been having this issue for a long time and didn't know how to fix it other than starting over from scratch. This was it, deleted IBOutlets from the view controller, but didn't know they were still referenced/linked in the owner (in this case "View Controller" in interface builder - Xcode 6).

                              – Ira Herman
                              Oct 1 '14 at 7:01



















                            Thank you! This fixed it for me. I've been having this issue for a long time and didn't know how to fix it other than starting over from scratch. This was it, deleted IBOutlets from the view controller, but didn't know they were still referenced/linked in the owner (in this case "View Controller" in interface builder - Xcode 6).

                            – Ira Herman
                            Oct 1 '14 at 7:01







                            Thank you! This fixed it for me. I've been having this issue for a long time and didn't know how to fix it other than starting over from scratch. This was it, deleted IBOutlets from the view controller, but didn't know they were still referenced/linked in the owner (in this case "View Controller" in interface builder - Xcode 6).

                            – Ira Herman
                            Oct 1 '14 at 7:01













                            40














                            I had the same problem and while TechZen's answer may indeed be amazing I found it hard to apply to my situation.



                            Eventually I resolved the issue by linking the label via the Controller listed under Objects (highlighted in the image below) rather then via the File Owner.



                            Hope this helps.



                            enter image description here






                            share|improve this answer






























                              40














                              I had the same problem and while TechZen's answer may indeed be amazing I found it hard to apply to my situation.



                              Eventually I resolved the issue by linking the label via the Controller listed under Objects (highlighted in the image below) rather then via the File Owner.



                              Hope this helps.



                              enter image description here






                              share|improve this answer




























                                40












                                40








                                40







                                I had the same problem and while TechZen's answer may indeed be amazing I found it hard to apply to my situation.



                                Eventually I resolved the issue by linking the label via the Controller listed under Objects (highlighted in the image below) rather then via the File Owner.



                                Hope this helps.



                                enter image description here






                                share|improve this answer















                                I had the same problem and while TechZen's answer may indeed be amazing I found it hard to apply to my situation.



                                Eventually I resolved the issue by linking the label via the Controller listed under Objects (highlighted in the image below) rather then via the File Owner.



                                Hope this helps.



                                enter image description here







                                share|improve this answer














                                share|improve this answer



                                share|improve this answer








                                edited Jun 28 '13 at 18:33


























                                community wiki





                                Eric Brotto
























                                    35














                                    in my case it was an error in the storyboard source code, follow these steps:




                                    1. first open your story board as source code

                                    2. search for <connections>

                                    3. remove unwanted connections


                                    For example:



                                    <connections>
                                    <outlet property="mapPostsView" destination="4EV-NK-Bhn" id="ubM-Z6-mwl"/>
                                    <outlet property="mapView" destination="kx6-TV-oQg" id="4wY-jv-Ih6"/>
                                    <outlet property="sidebarButton" destination="6UH-BZ-60q" id="8Yz-5G-HpY"/>
                                    </connections>


                                    As you see, these are connections between your code variables' names and the storyboard layout xml tags ;)






                                    share|improve this answer


























                                    • worked for me :)

                                      – Navneet Krishna
                                      Nov 30 '17 at 6:04
















                                    35














                                    in my case it was an error in the storyboard source code, follow these steps:




                                    1. first open your story board as source code

                                    2. search for <connections>

                                    3. remove unwanted connections


                                    For example:



                                    <connections>
                                    <outlet property="mapPostsView" destination="4EV-NK-Bhn" id="ubM-Z6-mwl"/>
                                    <outlet property="mapView" destination="kx6-TV-oQg" id="4wY-jv-Ih6"/>
                                    <outlet property="sidebarButton" destination="6UH-BZ-60q" id="8Yz-5G-HpY"/>
                                    </connections>


                                    As you see, these are connections between your code variables' names and the storyboard layout xml tags ;)






                                    share|improve this answer


























                                    • worked for me :)

                                      – Navneet Krishna
                                      Nov 30 '17 at 6:04














                                    35












                                    35








                                    35







                                    in my case it was an error in the storyboard source code, follow these steps:




                                    1. first open your story board as source code

                                    2. search for <connections>

                                    3. remove unwanted connections


                                    For example:



                                    <connections>
                                    <outlet property="mapPostsView" destination="4EV-NK-Bhn" id="ubM-Z6-mwl"/>
                                    <outlet property="mapView" destination="kx6-TV-oQg" id="4wY-jv-Ih6"/>
                                    <outlet property="sidebarButton" destination="6UH-BZ-60q" id="8Yz-5G-HpY"/>
                                    </connections>


                                    As you see, these are connections between your code variables' names and the storyboard layout xml tags ;)






                                    share|improve this answer















                                    in my case it was an error in the storyboard source code, follow these steps:




                                    1. first open your story board as source code

                                    2. search for <connections>

                                    3. remove unwanted connections


                                    For example:



                                    <connections>
                                    <outlet property="mapPostsView" destination="4EV-NK-Bhn" id="ubM-Z6-mwl"/>
                                    <outlet property="mapView" destination="kx6-TV-oQg" id="4wY-jv-Ih6"/>
                                    <outlet property="sidebarButton" destination="6UH-BZ-60q" id="8Yz-5G-HpY"/>
                                    </connections>


                                    As you see, these are connections between your code variables' names and the storyboard layout xml tags ;)







                                    share|improve this answer














                                    share|improve this answer



                                    share|improve this answer








                                    edited Apr 15 '16 at 18:07


























                                    community wiki





                                    2 revs, 2 users 78%
                                    fareed namrouti














                                    • worked for me :)

                                      – Navneet Krishna
                                      Nov 30 '17 at 6:04



















                                    • worked for me :)

                                      – Navneet Krishna
                                      Nov 30 '17 at 6:04

















                                    worked for me :)

                                    – Navneet Krishna
                                    Nov 30 '17 at 6:04





                                    worked for me :)

                                    – Navneet Krishna
                                    Nov 30 '17 at 6:04











                                    30














                                    This was happening to me only when debugging on a device (iPhone). The iOS Simulator was working OK. Doing a "Product->Clean" from Xcode seemed to solve the problem, but I have no idea why.






                                    share|improve this answer


























                                    • This solve my problem. tsk2x almost 3 days of headache.

                                      – user3818576
                                      Jan 29 '15 at 3:06






                                    • 5





                                      It does provide an answer to the question. Something got messed up in Nib and doing a clean solved it. I read and tried all of the above to no avail and then did the clean, and after 1 hour of trying to fix it, Maj's solution fixed it. I would've loved to see what in the XML could've caused this but I've moved on.

                                      – LevinsonTechnologies
                                      Apr 8 '15 at 18:47











                                    • This does indeed solve the issue - I tried numerous suggestions above and only did the project clean fix this error that suddenly started occurring. Ugg...

                                      – DustinB
                                      May 12 '15 at 5:03











                                    • This fix my problem, I tried lot of above suggestions. Seems strange!

                                      – Naveen Shan
                                      Dec 29 '15 at 5:30
















                                    30














                                    This was happening to me only when debugging on a device (iPhone). The iOS Simulator was working OK. Doing a "Product->Clean" from Xcode seemed to solve the problem, but I have no idea why.






                                    share|improve this answer


























                                    • This solve my problem. tsk2x almost 3 days of headache.

                                      – user3818576
                                      Jan 29 '15 at 3:06






                                    • 5





                                      It does provide an answer to the question. Something got messed up in Nib and doing a clean solved it. I read and tried all of the above to no avail and then did the clean, and after 1 hour of trying to fix it, Maj's solution fixed it. I would've loved to see what in the XML could've caused this but I've moved on.

                                      – LevinsonTechnologies
                                      Apr 8 '15 at 18:47











                                    • This does indeed solve the issue - I tried numerous suggestions above and only did the project clean fix this error that suddenly started occurring. Ugg...

                                      – DustinB
                                      May 12 '15 at 5:03











                                    • This fix my problem, I tried lot of above suggestions. Seems strange!

                                      – Naveen Shan
                                      Dec 29 '15 at 5:30














                                    30












                                    30








                                    30







                                    This was happening to me only when debugging on a device (iPhone). The iOS Simulator was working OK. Doing a "Product->Clean" from Xcode seemed to solve the problem, but I have no idea why.






                                    share|improve this answer















                                    This was happening to me only when debugging on a device (iPhone). The iOS Simulator was working OK. Doing a "Product->Clean" from Xcode seemed to solve the problem, but I have no idea why.







                                    share|improve this answer














                                    share|improve this answer



                                    share|improve this answer








                                    answered Oct 14 '13 at 0:00


























                                    community wiki





                                    Maj














                                    • This solve my problem. tsk2x almost 3 days of headache.

                                      – user3818576
                                      Jan 29 '15 at 3:06






                                    • 5





                                      It does provide an answer to the question. Something got messed up in Nib and doing a clean solved it. I read and tried all of the above to no avail and then did the clean, and after 1 hour of trying to fix it, Maj's solution fixed it. I would've loved to see what in the XML could've caused this but I've moved on.

                                      – LevinsonTechnologies
                                      Apr 8 '15 at 18:47











                                    • This does indeed solve the issue - I tried numerous suggestions above and only did the project clean fix this error that suddenly started occurring. Ugg...

                                      – DustinB
                                      May 12 '15 at 5:03











                                    • This fix my problem, I tried lot of above suggestions. Seems strange!

                                      – Naveen Shan
                                      Dec 29 '15 at 5:30



















                                    • This solve my problem. tsk2x almost 3 days of headache.

                                      – user3818576
                                      Jan 29 '15 at 3:06






                                    • 5





                                      It does provide an answer to the question. Something got messed up in Nib and doing a clean solved it. I read and tried all of the above to no avail and then did the clean, and after 1 hour of trying to fix it, Maj's solution fixed it. I would've loved to see what in the XML could've caused this but I've moved on.

                                      – LevinsonTechnologies
                                      Apr 8 '15 at 18:47











                                    • This does indeed solve the issue - I tried numerous suggestions above and only did the project clean fix this error that suddenly started occurring. Ugg...

                                      – DustinB
                                      May 12 '15 at 5:03











                                    • This fix my problem, I tried lot of above suggestions. Seems strange!

                                      – Naveen Shan
                                      Dec 29 '15 at 5:30

















                                    This solve my problem. tsk2x almost 3 days of headache.

                                    – user3818576
                                    Jan 29 '15 at 3:06





                                    This solve my problem. tsk2x almost 3 days of headache.

                                    – user3818576
                                    Jan 29 '15 at 3:06




                                    5




                                    5





                                    It does provide an answer to the question. Something got messed up in Nib and doing a clean solved it. I read and tried all of the above to no avail and then did the clean, and after 1 hour of trying to fix it, Maj's solution fixed it. I would've loved to see what in the XML could've caused this but I've moved on.

                                    – LevinsonTechnologies
                                    Apr 8 '15 at 18:47





                                    It does provide an answer to the question. Something got messed up in Nib and doing a clean solved it. I read and tried all of the above to no avail and then did the clean, and after 1 hour of trying to fix it, Maj's solution fixed it. I would've loved to see what in the XML could've caused this but I've moved on.

                                    – LevinsonTechnologies
                                    Apr 8 '15 at 18:47













                                    This does indeed solve the issue - I tried numerous suggestions above and only did the project clean fix this error that suddenly started occurring. Ugg...

                                    – DustinB
                                    May 12 '15 at 5:03





                                    This does indeed solve the issue - I tried numerous suggestions above and only did the project clean fix this error that suddenly started occurring. Ugg...

                                    – DustinB
                                    May 12 '15 at 5:03













                                    This fix my problem, I tried lot of above suggestions. Seems strange!

                                    – Naveen Shan
                                    Dec 29 '15 at 5:30





                                    This fix my problem, I tried lot of above suggestions. Seems strange!

                                    – Naveen Shan
                                    Dec 29 '15 at 5:30











                                    30














                                    enter image description hereenter image description here



                                    My fix was similar to Gerard Grundy's. In creating a custom UITableViewCell using an XIB, I had mistakenly applied the Custom Class name to the File's Owner instead of to the UITableViewCell. Applying the class to the UITableViewCell on the canvas and connecting my IBOutlet properties to it solved the issue.






                                    share|improve this answer


























                                    • Ayyy dag nab it... Can't believe how often I make this mistake. Thanks lol

                                      – Benjamin
                                      May 11 '18 at 14:13
















                                    30














                                    enter image description hereenter image description here



                                    My fix was similar to Gerard Grundy's. In creating a custom UITableViewCell using an XIB, I had mistakenly applied the Custom Class name to the File's Owner instead of to the UITableViewCell. Applying the class to the UITableViewCell on the canvas and connecting my IBOutlet properties to it solved the issue.






                                    share|improve this answer


























                                    • Ayyy dag nab it... Can't believe how often I make this mistake. Thanks lol

                                      – Benjamin
                                      May 11 '18 at 14:13














                                    30












                                    30








                                    30







                                    enter image description hereenter image description here



                                    My fix was similar to Gerard Grundy's. In creating a custom UITableViewCell using an XIB, I had mistakenly applied the Custom Class name to the File's Owner instead of to the UITableViewCell. Applying the class to the UITableViewCell on the canvas and connecting my IBOutlet properties to it solved the issue.






                                    share|improve this answer















                                    enter image description hereenter image description here



                                    My fix was similar to Gerard Grundy's. In creating a custom UITableViewCell using an XIB, I had mistakenly applied the Custom Class name to the File's Owner instead of to the UITableViewCell. Applying the class to the UITableViewCell on the canvas and connecting my IBOutlet properties to it solved the issue.







                                    share|improve this answer














                                    share|improve this answer



                                    share|improve this answer








                                    answered Mar 6 '14 at 19:57


























                                    community wiki





                                    ashack














                                    • Ayyy dag nab it... Can't believe how often I make this mistake. Thanks lol

                                      – Benjamin
                                      May 11 '18 at 14:13



















                                    • Ayyy dag nab it... Can't believe how often I make this mistake. Thanks lol

                                      – Benjamin
                                      May 11 '18 at 14:13

















                                    Ayyy dag nab it... Can't believe how often I make this mistake. Thanks lol

                                    – Benjamin
                                    May 11 '18 at 14:13





                                    Ayyy dag nab it... Can't believe how often I make this mistake. Thanks lol

                                    – Benjamin
                                    May 11 '18 at 14:13











                                    28















                                    1. You only need to specify IBOutlet once, the IBOutlet label your ivar is unnecessary.

                                    2. Are you instantiating your NIB using your UIViewController? At some point you should be calling [SecondView initWithNibName:@"yourNibName" bundle:nil];






                                    share|improve this answer


























                                    • This helped! I was getting a key-value coding compliance error about a property from a different view controller. Turns out I was calling -initWithNibName with the wrong nib name.

                                      – jlstrecker
                                      Oct 25 '11 at 18:11











                                    • Yes this helped me too.. i was using the UIViewController instead of MyCustomeViewController.. but this is kind of hierarchy issue may be.. the introspection failed because of the miss placed class object.. Thank you anyways

                                      – Futur
                                      Dec 12 '11 at 5:38













                                    • I had a similar issue. Two identical IBAction entries by accident. Didn't show in the code, only in the right-click of the UIControl (A UIStepper in my case). Just deleting one fixed it.

                                      – Dave Hubbard
                                      Dec 9 '18 at 2:42
















                                    28















                                    1. You only need to specify IBOutlet once, the IBOutlet label your ivar is unnecessary.

                                    2. Are you instantiating your NIB using your UIViewController? At some point you should be calling [SecondView initWithNibName:@"yourNibName" bundle:nil];






                                    share|improve this answer


























                                    • This helped! I was getting a key-value coding compliance error about a property from a different view controller. Turns out I was calling -initWithNibName with the wrong nib name.

                                      – jlstrecker
                                      Oct 25 '11 at 18:11











                                    • Yes this helped me too.. i was using the UIViewController instead of MyCustomeViewController.. but this is kind of hierarchy issue may be.. the introspection failed because of the miss placed class object.. Thank you anyways

                                      – Futur
                                      Dec 12 '11 at 5:38













                                    • I had a similar issue. Two identical IBAction entries by accident. Didn't show in the code, only in the right-click of the UIControl (A UIStepper in my case). Just deleting one fixed it.

                                      – Dave Hubbard
                                      Dec 9 '18 at 2:42














                                    28












                                    28








                                    28








                                    1. You only need to specify IBOutlet once, the IBOutlet label your ivar is unnecessary.

                                    2. Are you instantiating your NIB using your UIViewController? At some point you should be calling [SecondView initWithNibName:@"yourNibName" bundle:nil];






                                    share|improve this answer
















                                    1. You only need to specify IBOutlet once, the IBOutlet label your ivar is unnecessary.

                                    2. Are you instantiating your NIB using your UIViewController? At some point you should be calling [SecondView initWithNibName:@"yourNibName" bundle:nil];







                                    share|improve this answer














                                    share|improve this answer



                                    share|improve this answer








                                    answered Jun 21 '10 at 20:07


























                                    community wiki





                                    kubi














                                    • This helped! I was getting a key-value coding compliance error about a property from a different view controller. Turns out I was calling -initWithNibName with the wrong nib name.

                                      – jlstrecker
                                      Oct 25 '11 at 18:11











                                    • Yes this helped me too.. i was using the UIViewController instead of MyCustomeViewController.. but this is kind of hierarchy issue may be.. the introspection failed because of the miss placed class object.. Thank you anyways

                                      – Futur
                                      Dec 12 '11 at 5:38













                                    • I had a similar issue. Two identical IBAction entries by accident. Didn't show in the code, only in the right-click of the UIControl (A UIStepper in my case). Just deleting one fixed it.

                                      – Dave Hubbard
                                      Dec 9 '18 at 2:42



















                                    • This helped! I was getting a key-value coding compliance error about a property from a different view controller. Turns out I was calling -initWithNibName with the wrong nib name.

                                      – jlstrecker
                                      Oct 25 '11 at 18:11











                                    • Yes this helped me too.. i was using the UIViewController instead of MyCustomeViewController.. but this is kind of hierarchy issue may be.. the introspection failed because of the miss placed class object.. Thank you anyways

                                      – Futur
                                      Dec 12 '11 at 5:38













                                    • I had a similar issue. Two identical IBAction entries by accident. Didn't show in the code, only in the right-click of the UIControl (A UIStepper in my case). Just deleting one fixed it.

                                      – Dave Hubbard
                                      Dec 9 '18 at 2:42

















                                    This helped! I was getting a key-value coding compliance error about a property from a different view controller. Turns out I was calling -initWithNibName with the wrong nib name.

                                    – jlstrecker
                                    Oct 25 '11 at 18:11





                                    This helped! I was getting a key-value coding compliance error about a property from a different view controller. Turns out I was calling -initWithNibName with the wrong nib name.

                                    – jlstrecker
                                    Oct 25 '11 at 18:11













                                    Yes this helped me too.. i was using the UIViewController instead of MyCustomeViewController.. but this is kind of hierarchy issue may be.. the introspection failed because of the miss placed class object.. Thank you anyways

                                    – Futur
                                    Dec 12 '11 at 5:38







                                    Yes this helped me too.. i was using the UIViewController instead of MyCustomeViewController.. but this is kind of hierarchy issue may be.. the introspection failed because of the miss placed class object.. Thank you anyways

                                    – Futur
                                    Dec 12 '11 at 5:38















                                    I had a similar issue. Two identical IBAction entries by accident. Didn't show in the code, only in the right-click of the UIControl (A UIStepper in my case). Just deleting one fixed it.

                                    – Dave Hubbard
                                    Dec 9 '18 at 2:42





                                    I had a similar issue. Two identical IBAction entries by accident. Didn't show in the code, only in the right-click of the UIControl (A UIStepper in my case). Just deleting one fixed it.

                                    – Dave Hubbard
                                    Dec 9 '18 at 2:42











                                    21














                                    I had exact same error message and thanks (!!) to Kira from http://www.idev101.com I was able to solve the challenge. I only found her site after googling and stacking over all these threads. I'm now posting here for the next one that comes to StackOverFlow and has the same challenge I had since that person will most likely come to this thread over Google.



                                    I realized, that I wrongly made this:



                                    UIViewController *deviceViewController = [[UIViewController alloc] initWithNibName:@"DeviceViewController" bundle:nil];


                                    Instead of THIS:



                                    DeviceViewController *deviceViewController = [[DeviceViewController alloc] initWithNibName:@"DeviceViewController" bundle:nil];


                                    Where



                                    DeviceViewController


                                    Was the name of my Class also known as



                                    DeviceViewController.h 
                                    DeviceViewController.m


                                    You'll have to



                                    "import DeviceViewController.h"


                                    in your implementation (.m File) where you want to call e.g. another UIViewController.



                                    I am absolutely not sorry if I am only stating the obvious for beginners like me and may get down votes as this is not exactly related to the question but I was searching 4 (?!?) hours straight now for the answer to these error message. If I can spare this to 1 or 2 people that'd be great :)



                                    PS: For those interested in how the code continues for loading the other UIViewController:



                                        [self presentViewController:deviceViewController animated:YES completion:nil];





                                    share|improve this answer


























                                    • THANKS for all the steps there, I was using Xcode 5 and didn't really know how to manually add a nib as you can only add storyboard by default.... I got some instructions but non as detailed as yours. Really helped!!

                                      – Pittfall
                                      Oct 10 '13 at 20:39


















                                    21














                                    I had exact same error message and thanks (!!) to Kira from http://www.idev101.com I was able to solve the challenge. I only found her site after googling and stacking over all these threads. I'm now posting here for the next one that comes to StackOverFlow and has the same challenge I had since that person will most likely come to this thread over Google.



                                    I realized, that I wrongly made this:



                                    UIViewController *deviceViewController = [[UIViewController alloc] initWithNibName:@"DeviceViewController" bundle:nil];


                                    Instead of THIS:



                                    DeviceViewController *deviceViewController = [[DeviceViewController alloc] initWithNibName:@"DeviceViewController" bundle:nil];


                                    Where



                                    DeviceViewController


                                    Was the name of my Class also known as



                                    DeviceViewController.h 
                                    DeviceViewController.m


                                    You'll have to



                                    "import DeviceViewController.h"


                                    in your implementation (.m File) where you want to call e.g. another UIViewController.



                                    I am absolutely not sorry if I am only stating the obvious for beginners like me and may get down votes as this is not exactly related to the question but I was searching 4 (?!?) hours straight now for the answer to these error message. If I can spare this to 1 or 2 people that'd be great :)



                                    PS: For those interested in how the code continues for loading the other UIViewController:



                                        [self presentViewController:deviceViewController animated:YES completion:nil];





                                    share|improve this answer


























                                    • THANKS for all the steps there, I was using Xcode 5 and didn't really know how to manually add a nib as you can only add storyboard by default.... I got some instructions but non as detailed as yours. Really helped!!

                                      – Pittfall
                                      Oct 10 '13 at 20:39
















                                    21












                                    21








                                    21







                                    I had exact same error message and thanks (!!) to Kira from http://www.idev101.com I was able to solve the challenge. I only found her site after googling and stacking over all these threads. I'm now posting here for the next one that comes to StackOverFlow and has the same challenge I had since that person will most likely come to this thread over Google.



                                    I realized, that I wrongly made this:



                                    UIViewController *deviceViewController = [[UIViewController alloc] initWithNibName:@"DeviceViewController" bundle:nil];


                                    Instead of THIS:



                                    DeviceViewController *deviceViewController = [[DeviceViewController alloc] initWithNibName:@"DeviceViewController" bundle:nil];


                                    Where



                                    DeviceViewController


                                    Was the name of my Class also known as



                                    DeviceViewController.h 
                                    DeviceViewController.m


                                    You'll have to



                                    "import DeviceViewController.h"


                                    in your implementation (.m File) where you want to call e.g. another UIViewController.



                                    I am absolutely not sorry if I am only stating the obvious for beginners like me and may get down votes as this is not exactly related to the question but I was searching 4 (?!?) hours straight now for the answer to these error message. If I can spare this to 1 or 2 people that'd be great :)



                                    PS: For those interested in how the code continues for loading the other UIViewController:



                                        [self presentViewController:deviceViewController animated:YES completion:nil];





                                    share|improve this answer















                                    I had exact same error message and thanks (!!) to Kira from http://www.idev101.com I was able to solve the challenge. I only found her site after googling and stacking over all these threads. I'm now posting here for the next one that comes to StackOverFlow and has the same challenge I had since that person will most likely come to this thread over Google.



                                    I realized, that I wrongly made this:



                                    UIViewController *deviceViewController = [[UIViewController alloc] initWithNibName:@"DeviceViewController" bundle:nil];


                                    Instead of THIS:



                                    DeviceViewController *deviceViewController = [[DeviceViewController alloc] initWithNibName:@"DeviceViewController" bundle:nil];


                                    Where



                                    DeviceViewController


                                    Was the name of my Class also known as



                                    DeviceViewController.h 
                                    DeviceViewController.m


                                    You'll have to



                                    "import DeviceViewController.h"


                                    in your implementation (.m File) where you want to call e.g. another UIViewController.



                                    I am absolutely not sorry if I am only stating the obvious for beginners like me and may get down votes as this is not exactly related to the question but I was searching 4 (?!?) hours straight now for the answer to these error message. If I can spare this to 1 or 2 people that'd be great :)



                                    PS: For those interested in how the code continues for loading the other UIViewController:



                                        [self presentViewController:deviceViewController animated:YES completion:nil];






                                    share|improve this answer














                                    share|improve this answer



                                    share|improve this answer








                                    answered Aug 31 '13 at 21:40


























                                    community wiki





                                    Yannis














                                    • THANKS for all the steps there, I was using Xcode 5 and didn't really know how to manually add a nib as you can only add storyboard by default.... I got some instructions but non as detailed as yours. Really helped!!

                                      – Pittfall
                                      Oct 10 '13 at 20:39





















                                    • THANKS for all the steps there, I was using Xcode 5 and didn't really know how to manually add a nib as you can only add storyboard by default.... I got some instructions but non as detailed as yours. Really helped!!

                                      – Pittfall
                                      Oct 10 '13 at 20:39



















                                    THANKS for all the steps there, I was using Xcode 5 and didn't really know how to manually add a nib as you can only add storyboard by default.... I got some instructions but non as detailed as yours. Really helped!!

                                    – Pittfall
                                    Oct 10 '13 at 20:39







                                    THANKS for all the steps there, I was using Xcode 5 and didn't really know how to manually add a nib as you can only add storyboard by default.... I got some instructions but non as detailed as yours. Really helped!!

                                    – Pittfall
                                    Oct 10 '13 at 20:39













                                    21














                                    It can come from the fact that you have control dragged and created an outlet or action, and forgot to delete it. Even if you deleted the code, or even if you have made enough cmd+Z, you'll need to go in the connection inspector of your storyboard and see if the action or outlet you created is still here or not.






                                    share|improve this answer


























                                    • Thanks! I'm a n00b on Xcode and took me a while to find the rogue links. In Xcode 9.2, you can right click on the element in the storyboard view and check the "Referencing outlets".

                                      – kunigami
                                      Jan 22 '18 at 7:00
















                                    21














                                    It can come from the fact that you have control dragged and created an outlet or action, and forgot to delete it. Even if you deleted the code, or even if you have made enough cmd+Z, you'll need to go in the connection inspector of your storyboard and see if the action or outlet you created is still here or not.






                                    share|improve this answer


























                                    • Thanks! I'm a n00b on Xcode and took me a while to find the rogue links. In Xcode 9.2, you can right click on the element in the storyboard view and check the "Referencing outlets".

                                      – kunigami
                                      Jan 22 '18 at 7:00














                                    21












                                    21








                                    21







                                    It can come from the fact that you have control dragged and created an outlet or action, and forgot to delete it. Even if you deleted the code, or even if you have made enough cmd+Z, you'll need to go in the connection inspector of your storyboard and see if the action or outlet you created is still here or not.






                                    share|improve this answer















                                    It can come from the fact that you have control dragged and created an outlet or action, and forgot to delete it. Even if you deleted the code, or even if you have made enough cmd+Z, you'll need to go in the connection inspector of your storyboard and see if the action or outlet you created is still here or not.







                                    share|improve this answer














                                    share|improve this answer



                                    share|improve this answer








                                    answered Aug 12 '17 at 12:08


























                                    community wiki





                                    Ilansky Naftali














                                    • Thanks! I'm a n00b on Xcode and took me a while to find the rogue links. In Xcode 9.2, you can right click on the element in the storyboard view and check the "Referencing outlets".

                                      – kunigami
                                      Jan 22 '18 at 7:00



















                                    • Thanks! I'm a n00b on Xcode and took me a while to find the rogue links. In Xcode 9.2, you can right click on the element in the storyboard view and check the "Referencing outlets".

                                      – kunigami
                                      Jan 22 '18 at 7:00

















                                    Thanks! I'm a n00b on Xcode and took me a while to find the rogue links. In Xcode 9.2, you can right click on the element in the storyboard view and check the "Referencing outlets".

                                    – kunigami
                                    Jan 22 '18 at 7:00





                                    Thanks! I'm a n00b on Xcode and took me a while to find the rogue links. In Xcode 9.2, you can right click on the element in the storyboard view and check the "Referencing outlets".

                                    – kunigami
                                    Jan 22 '18 at 7:00











                                    16














                                    Looking over the other answers it seems like there are a lot of things that can cause this error. Here is one more.



                                    If you




                                    • have a custom view

                                    • added an @IBInspectable property

                                    • and then later deleted it


                                    Then you may also get an error similar to




                                    Failed to set (xxx) user defined inspected property on [Your Custom
                                    View] ...: this class is not key value coding-compliant for the key
                                    [xxx].




                                    The solution is to delete the the old property.



                                    enter image description here



                                    Open the Identity inspector for your class, select the property name under User Defined Runtime Attributes, and press the minus button (-).






                                    share|improve this answer






























                                      16














                                      Looking over the other answers it seems like there are a lot of things that can cause this error. Here is one more.



                                      If you




                                      • have a custom view

                                      • added an @IBInspectable property

                                      • and then later deleted it


                                      Then you may also get an error similar to




                                      Failed to set (xxx) user defined inspected property on [Your Custom
                                      View] ...: this class is not key value coding-compliant for the key
                                      [xxx].




                                      The solution is to delete the the old property.



                                      enter image description here



                                      Open the Identity inspector for your class, select the property name under User Defined Runtime Attributes, and press the minus button (-).






                                      share|improve this answer




























                                        16












                                        16








                                        16







                                        Looking over the other answers it seems like there are a lot of things that can cause this error. Here is one more.



                                        If you




                                        • have a custom view

                                        • added an @IBInspectable property

                                        • and then later deleted it


                                        Then you may also get an error similar to




                                        Failed to set (xxx) user defined inspected property on [Your Custom
                                        View] ...: this class is not key value coding-compliant for the key
                                        [xxx].




                                        The solution is to delete the the old property.



                                        enter image description here



                                        Open the Identity inspector for your class, select the property name under User Defined Runtime Attributes, and press the minus button (-).






                                        share|improve this answer















                                        Looking over the other answers it seems like there are a lot of things that can cause this error. Here is one more.



                                        If you




                                        • have a custom view

                                        • added an @IBInspectable property

                                        • and then later deleted it


                                        Then you may also get an error similar to




                                        Failed to set (xxx) user defined inspected property on [Your Custom
                                        View] ...: this class is not key value coding-compliant for the key
                                        [xxx].




                                        The solution is to delete the the old property.



                                        enter image description here



                                        Open the Identity inspector for your class, select the property name under User Defined Runtime Attributes, and press the minus button (-).







                                        share|improve this answer














                                        share|improve this answer



                                        share|improve this answer








                                        edited Feb 5 '18 at 14:19


























                                        community wiki





                                        2 revs, 2 users 98%
                                        Suragch
























                                            15














                                            This happens to me when my view controller originally had an .xib file, but now is created programmatically.



                                            Even though I have deleted the .xib file from this project. The users iPhone/iPad may contain an .xib files for this viewcontroller.



                                            Attempting to load an .xib file usually causes this crash:



                                            Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIViewController 0x18afe0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key welcomeLabel.'


                                            Solution when creating it programmatically may be this:



                                            -(void)loadView {
                                            // Ensure that we don't load an .xib file for this viewcontroller
                                            self.view = [UIView new];
                                            }





                                            share|improve this answer






























                                              15














                                              This happens to me when my view controller originally had an .xib file, but now is created programmatically.



                                              Even though I have deleted the .xib file from this project. The users iPhone/iPad may contain an .xib files for this viewcontroller.



                                              Attempting to load an .xib file usually causes this crash:



                                              Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIViewController 0x18afe0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key welcomeLabel.'


                                              Solution when creating it programmatically may be this:



                                              -(void)loadView {
                                              // Ensure that we don't load an .xib file for this viewcontroller
                                              self.view = [UIView new];
                                              }





                                              share|improve this answer




























                                                15












                                                15








                                                15







                                                This happens to me when my view controller originally had an .xib file, but now is created programmatically.



                                                Even though I have deleted the .xib file from this project. The users iPhone/iPad may contain an .xib files for this viewcontroller.



                                                Attempting to load an .xib file usually causes this crash:



                                                Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIViewController 0x18afe0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key welcomeLabel.'


                                                Solution when creating it programmatically may be this:



                                                -(void)loadView {
                                                // Ensure that we don't load an .xib file for this viewcontroller
                                                self.view = [UIView new];
                                                }





                                                share|improve this answer















                                                This happens to me when my view controller originally had an .xib file, but now is created programmatically.



                                                Even though I have deleted the .xib file from this project. The users iPhone/iPad may contain an .xib files for this viewcontroller.



                                                Attempting to load an .xib file usually causes this crash:



                                                Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIViewController 0x18afe0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key welcomeLabel.'


                                                Solution when creating it programmatically may be this:



                                                -(void)loadView {
                                                // Ensure that we don't load an .xib file for this viewcontroller
                                                self.view = [UIView new];
                                                }






                                                share|improve this answer














                                                share|improve this answer



                                                share|improve this answer








                                                answered Jun 27 '13 at 19:06


























                                                community wiki





                                                neoneye
























                                                    12














                                                    "Module" property of View Controller in the Identity Inspector might be different than what you expected. Also make sure that new classes are added to your target list.






                                                    share|improve this answer


























                                                    • voting up since it was so in my case. I'm using Swift and Storyboards. When I created a new build target (to make a build variant) the app didn't work in the new variant while the first one worked OK. The app crashed on a View Controller where the module name was somehow set to module from the first target, while in working View Controllers it was Current - <module name here>. You need to erase the module name there in this case.

                                                      – Mixaz
                                                      Apr 26 '16 at 9:58













                                                    • You just saved my life! Thank you so much!!!

                                                      – joliejuly
                                                      Jul 4 '18 at 18:10
















                                                    12














                                                    "Module" property of View Controller in the Identity Inspector might be different than what you expected. Also make sure that new classes are added to your target list.






                                                    share|improve this answer


























                                                    • voting up since it was so in my case. I'm using Swift and Storyboards. When I created a new build target (to make a build variant) the app didn't work in the new variant while the first one worked OK. The app crashed on a View Controller where the module name was somehow set to module from the first target, while in working View Controllers it was Current - <module name here>. You need to erase the module name there in this case.

                                                      – Mixaz
                                                      Apr 26 '16 at 9:58













                                                    • You just saved my life! Thank you so much!!!

                                                      – joliejuly
                                                      Jul 4 '18 at 18:10














                                                    12












                                                    12








                                                    12







                                                    "Module" property of View Controller in the Identity Inspector might be different than what you expected. Also make sure that new classes are added to your target list.






                                                    share|improve this answer















                                                    "Module" property of View Controller in the Identity Inspector might be different than what you expected. Also make sure that new classes are added to your target list.







                                                    share|improve this answer














                                                    share|improve this answer



                                                    share|improve this answer








                                                    answered Sep 20 '15 at 16:24


























                                                    community wiki





                                                    ercu














                                                    • voting up since it was so in my case. I'm using Swift and Storyboards. When I created a new build target (to make a build variant) the app didn't work in the new variant while the first one worked OK. The app crashed on a View Controller where the module name was somehow set to module from the first target, while in working View Controllers it was Current - <module name here>. You need to erase the module name there in this case.

                                                      – Mixaz
                                                      Apr 26 '16 at 9:58













                                                    • You just saved my life! Thank you so much!!!

                                                      – joliejuly
                                                      Jul 4 '18 at 18:10



















                                                    • voting up since it was so in my case. I'm using Swift and Storyboards. When I created a new build target (to make a build variant) the app didn't work in the new variant while the first one worked OK. The app crashed on a View Controller where the module name was somehow set to module from the first target, while in working View Controllers it was Current - <module name here>. You need to erase the module name there in this case.

                                                      – Mixaz
                                                      Apr 26 '16 at 9:58













                                                    • You just saved my life! Thank you so much!!!

                                                      – joliejuly
                                                      Jul 4 '18 at 18:10

















                                                    voting up since it was so in my case. I'm using Swift and Storyboards. When I created a new build target (to make a build variant) the app didn't work in the new variant while the first one worked OK. The app crashed on a View Controller where the module name was somehow set to module from the first target, while in working View Controllers it was Current - <module name here>. You need to erase the module name there in this case.

                                                    – Mixaz
                                                    Apr 26 '16 at 9:58







                                                    voting up since it was so in my case. I'm using Swift and Storyboards. When I created a new build target (to make a build variant) the app didn't work in the new variant while the first one worked OK. The app crashed on a View Controller where the module name was somehow set to module from the first target, while in working View Controllers it was Current - <module name here>. You need to erase the module name there in this case.

                                                    – Mixaz
                                                    Apr 26 '16 at 9:58















                                                    You just saved my life! Thank you so much!!!

                                                    – joliejuly
                                                    Jul 4 '18 at 18:10





                                                    You just saved my life! Thank you so much!!!

                                                    – joliejuly
                                                    Jul 4 '18 at 18:10











                                                    10














                                                    I had a similar problem for a project that has two targets (with their own MainWindow XIB). The fundamental issue that caused this error for me was that the UIViewController class wasn't included in the second project's resource list. I.e. interface builder allowed me to specify it in MainWindow.xib, but at runtime the system couldn't locate the class.



                                                    I.e. cmd-click on the UIViewController class in question and double-check that it's included in the 'Targets' tab.






                                                    share|improve this answer






























                                                      10














                                                      I had a similar problem for a project that has two targets (with their own MainWindow XIB). The fundamental issue that caused this error for me was that the UIViewController class wasn't included in the second project's resource list. I.e. interface builder allowed me to specify it in MainWindow.xib, but at runtime the system couldn't locate the class.



                                                      I.e. cmd-click on the UIViewController class in question and double-check that it's included in the 'Targets' tab.






                                                      share|improve this answer




























                                                        10












                                                        10








                                                        10







                                                        I had a similar problem for a project that has two targets (with their own MainWindow XIB). The fundamental issue that caused this error for me was that the UIViewController class wasn't included in the second project's resource list. I.e. interface builder allowed me to specify it in MainWindow.xib, but at runtime the system couldn't locate the class.



                                                        I.e. cmd-click on the UIViewController class in question and double-check that it's included in the 'Targets' tab.






                                                        share|improve this answer















                                                        I had a similar problem for a project that has two targets (with their own MainWindow XIB). The fundamental issue that caused this error for me was that the UIViewController class wasn't included in the second project's resource list. I.e. interface builder allowed me to specify it in MainWindow.xib, but at runtime the system couldn't locate the class.



                                                        I.e. cmd-click on the UIViewController class in question and double-check that it's included in the 'Targets' tab.







                                                        share|improve this answer














                                                        share|improve this answer



                                                        share|improve this answer








                                                        answered Jan 6 '11 at 4:36


























                                                        community wiki





                                                        David Carney
























                                                            8














                                                            That might be the case of referencing a component from Xib Interface that you have renamed or delete. Re-referencing works for me.






                                                            share|improve this answer






























                                                              8














                                                              That might be the case of referencing a component from Xib Interface that you have renamed or delete. Re-referencing works for me.






                                                              share|improve this answer




























                                                                8












                                                                8








                                                                8







                                                                That might be the case of referencing a component from Xib Interface that you have renamed or delete. Re-referencing works for me.






                                                                share|improve this answer















                                                                That might be the case of referencing a component from Xib Interface that you have renamed or delete. Re-referencing works for me.







                                                                share|improve this answer














                                                                share|improve this answer



                                                                share|improve this answer








                                                                answered Jul 11 '12 at 10:34


























                                                                community wiki





                                                                MehrozKarim
























                                                                    8














                                                                    I just had this issue in my duplicated project and solved by checking 2 places:



                                                                    1- Make sure you have the .m file in the list -> Project - Build Phases - Compile Sources

                                                                    2- After that, go to interface builder (probably this is an error occures with only IB) and unlink all properties, labels, images, etc... Then re-link all. I have realized that I've removed an attribute but it was still linked in IB.



                                                                    Hope it works for some.






                                                                    share|improve this answer






























                                                                      8














                                                                      I just had this issue in my duplicated project and solved by checking 2 places:



                                                                      1- Make sure you have the .m file in the list -> Project - Build Phases - Compile Sources

                                                                      2- After that, go to interface builder (probably this is an error occures with only IB) and unlink all properties, labels, images, etc... Then re-link all. I have realized that I've removed an attribute but it was still linked in IB.



                                                                      Hope it works for some.






                                                                      share|improve this answer




























                                                                        8












                                                                        8








                                                                        8







                                                                        I just had this issue in my duplicated project and solved by checking 2 places:



                                                                        1- Make sure you have the .m file in the list -> Project - Build Phases - Compile Sources

                                                                        2- After that, go to interface builder (probably this is an error occures with only IB) and unlink all properties, labels, images, etc... Then re-link all. I have realized that I've removed an attribute but it was still linked in IB.



                                                                        Hope it works for some.






                                                                        share|improve this answer















                                                                        I just had this issue in my duplicated project and solved by checking 2 places:



                                                                        1- Make sure you have the .m file in the list -> Project - Build Phases - Compile Sources

                                                                        2- After that, go to interface builder (probably this is an error occures with only IB) and unlink all properties, labels, images, etc... Then re-link all. I have realized that I've removed an attribute but it was still linked in IB.



                                                                        Hope it works for some.







                                                                        share|improve this answer














                                                                        share|improve this answer



                                                                        share|improve this answer








                                                                        answered Oct 23 '12 at 9:06


























                                                                        community wiki





                                                                        kubilay
























                                                                            7














                                                                            Another "not compliant" issue I found was when I managed to have two copies of a class for some reason.



                                                                            I was adding keys to the wrong copy. Interface Builder still saw the keys and let me hook up to them, but at runtime it was using the other copy of the class that didn't have the new keys.



                                                                            To find which was the "right" copy I used XCode's cmd-click on the class name elsewhere to jump to the correct copy, then I killed off the bad unused copies (after bringing over my edits from the un-used copy first).



                                                                            Moral of the story: duplicate class files are bad.






                                                                            share|improve this answer


























                                                                            • Updated with project source.

                                                                              – Echilon
                                                                              May 16 '11 at 17:27
















                                                                            7














                                                                            Another "not compliant" issue I found was when I managed to have two copies of a class for some reason.



                                                                            I was adding keys to the wrong copy. Interface Builder still saw the keys and let me hook up to them, but at runtime it was using the other copy of the class that didn't have the new keys.



                                                                            To find which was the "right" copy I used XCode's cmd-click on the class name elsewhere to jump to the correct copy, then I killed off the bad unused copies (after bringing over my edits from the un-used copy first).



                                                                            Moral of the story: duplicate class files are bad.






                                                                            share|improve this answer


























                                                                            • Updated with project source.

                                                                              – Echilon
                                                                              May 16 '11 at 17:27














                                                                            7












                                                                            7








                                                                            7







                                                                            Another "not compliant" issue I found was when I managed to have two copies of a class for some reason.



                                                                            I was adding keys to the wrong copy. Interface Builder still saw the keys and let me hook up to them, but at runtime it was using the other copy of the class that didn't have the new keys.



                                                                            To find which was the "right" copy I used XCode's cmd-click on the class name elsewhere to jump to the correct copy, then I killed off the bad unused copies (after bringing over my edits from the un-used copy first).



                                                                            Moral of the story: duplicate class files are bad.






                                                                            share|improve this answer















                                                                            Another "not compliant" issue I found was when I managed to have two copies of a class for some reason.



                                                                            I was adding keys to the wrong copy. Interface Builder still saw the keys and let me hook up to them, but at runtime it was using the other copy of the class that didn't have the new keys.



                                                                            To find which was the "right" copy I used XCode's cmd-click on the class name elsewhere to jump to the correct copy, then I killed off the bad unused copies (after bringing over my edits from the un-used copy first).



                                                                            Moral of the story: duplicate class files are bad.







                                                                            share|improve this answer














                                                                            share|improve this answer



                                                                            share|improve this answer








                                                                            answered Aug 21 '10 at 14:04


























                                                                            community wiki





                                                                            Jason














                                                                            • Updated with project source.

                                                                              – Echilon
                                                                              May 16 '11 at 17:27



















                                                                            • Updated with project source.

                                                                              – Echilon
                                                                              May 16 '11 at 17:27

















                                                                            Updated with project source.

                                                                            – Echilon
                                                                            May 16 '11 at 17:27





                                                                            Updated with project source.

                                                                            – Echilon
                                                                            May 16 '11 at 17:27











                                                                            7














                                                                            This error is something else!



                                                                            Here is how i Fixed it. I'm using xcode Version 6.1.1 and using swift. I got this error every time my app tried to perform a segue to jump to the next screen. Here what I did.




                                                                            1. Checked that the button was connected to the right action.(This wasn't the problem, but still good to check)

                                                                            2. Check that the button does not have any additional actions or outlets that you may have created by mistake. (This wasn't the problem, but still good to check)

                                                                            3. Check the logs and make sure that all the buttons in the NEXT SCREEN have the correct actions, and if there are any segues, make sure that they have a unique identifier. (This was the problem)

                                                                              • One of the segues did not have a unique identifier

                                                                              • One of the buttons had an action and two outlets that I created by mistake.

                                                                              • Delete any additional outlets and make sure that you the segues to the next screen have unique identifiers.




                                                                            Cheers,






                                                                            share|improve this answer






























                                                                              7














                                                                              This error is something else!



                                                                              Here is how i Fixed it. I'm using xcode Version 6.1.1 and using swift. I got this error every time my app tried to perform a segue to jump to the next screen. Here what I did.




                                                                              1. Checked that the button was connected to the right action.(This wasn't the problem, but still good to check)

                                                                              2. Check that the button does not have any additional actions or outlets that you may have created by mistake. (This wasn't the problem, but still good to check)

                                                                              3. Check the logs and make sure that all the buttons in the NEXT SCREEN have the correct actions, and if there are any segues, make sure that they have a unique identifier. (This was the problem)

                                                                                • One of the segues did not have a unique identifier

                                                                                • One of the buttons had an action and two outlets that I created by mistake.

                                                                                • Delete any additional outlets and make sure that you the segues to the next screen have unique identifiers.




                                                                              Cheers,






                                                                              share|improve this answer




























                                                                                7












                                                                                7








                                                                                7







                                                                                This error is something else!



                                                                                Here is how i Fixed it. I'm using xcode Version 6.1.1 and using swift. I got this error every time my app tried to perform a segue to jump to the next screen. Here what I did.




                                                                                1. Checked that the button was connected to the right action.(This wasn't the problem, but still good to check)

                                                                                2. Check that the button does not have any additional actions or outlets that you may have created by mistake. (This wasn't the problem, but still good to check)

                                                                                3. Check the logs and make sure that all the buttons in the NEXT SCREEN have the correct actions, and if there are any segues, make sure that they have a unique identifier. (This was the problem)

                                                                                  • One of the segues did not have a unique identifier

                                                                                  • One of the buttons had an action and two outlets that I created by mistake.

                                                                                  • Delete any additional outlets and make sure that you the segues to the next screen have unique identifiers.




                                                                                Cheers,






                                                                                share|improve this answer















                                                                                This error is something else!



                                                                                Here is how i Fixed it. I'm using xcode Version 6.1.1 and using swift. I got this error every time my app tried to perform a segue to jump to the next screen. Here what I did.




                                                                                1. Checked that the button was connected to the right action.(This wasn't the problem, but still good to check)

                                                                                2. Check that the button does not have any additional actions or outlets that you may have created by mistake. (This wasn't the problem, but still good to check)

                                                                                3. Check the logs and make sure that all the buttons in the NEXT SCREEN have the correct actions, and if there are any segues, make sure that they have a unique identifier. (This was the problem)

                                                                                  • One of the segues did not have a unique identifier

                                                                                  • One of the buttons had an action and two outlets that I created by mistake.

                                                                                  • Delete any additional outlets and make sure that you the segues to the next screen have unique identifiers.




                                                                                Cheers,







                                                                                share|improve this answer














                                                                                share|improve this answer



                                                                                share|improve this answer








                                                                                answered Feb 22 '15 at 6:43


























                                                                                community wiki





                                                                                Ronaldoh1
























                                                                                    7














                                                                                    Just to add to this, because I was getting this error as well. Going through all these answers most seem to apply to working with the UI and storyboard stuff. I know the original poster did seem to be working with the UI but when searching for possible reasons for this error mostly all questions lead back to this question with those others being closed as duplicates or simply having issues with connecting things in a storyboard so I will add my solution.



                                                                                    I was working on coding a web service in Swift 2. I had built all the needed proxy objects and stubs. As I looped through the returned XML I was dynamically instantiating my objects, which all came from NSObject and using setValue:forKey on them. Every time setValue:forKey tried to set a property it blew up with this error.



                                                                                    I had a switch statement for each type I was dealing with (e.g. Bool?, CShort?, String?) and for each XML node I went through and checked what the type was on the object and then converted the value to that type and attempted to set it with setValue:forKey.



                                                                                    Eventually I started commenting out all these setValue:forKey lines and found that my default switch statement case did work for String?.



                                                                                    I finally figured out that you can't use optional swift types with setValue:forKey unless they have a direct mapping to an Objective-C type like String? or NSNumber?. I ended up changing all CShort? types to NSNumber? since that has a direct mapping. For Bool? in my case it was fine for me to just use Bool and initialize it to false. Others may not have that luxury.



                                                                                    Anyway what a headache that was so hopefully this helps someone else who has a similar problem and keeps getting redirected to this question and saying to themselves, "I am not doing anything in UI!!".



                                                                                    So lastly to reiterate one more time Key-Value Coding does not work with optionals. Below I ended up finding somewhere but I forget where so to whoever posted this I apologize and would give credit if I remembered where I found this but it saved my life:




                                                                                    You cannot use KVC on an Optional Int property, because KVC is Cocoa /
                                                                                    Objective-C, and Objective-C cannot see an Optional Int - it is not
                                                                                    bridged to Objective-C. Objective-C can only see types that are
                                                                                    bridged to Objective-C:



                                                                                    class types that are derived from NSObject



                                                                                    class types that are exposed with @objc



                                                                                    Swift structs that are bridged







                                                                                    share|improve this answer






























                                                                                      7














                                                                                      Just to add to this, because I was getting this error as well. Going through all these answers most seem to apply to working with the UI and storyboard stuff. I know the original poster did seem to be working with the UI but when searching for possible reasons for this error mostly all questions lead back to this question with those others being closed as duplicates or simply having issues with connecting things in a storyboard so I will add my solution.



                                                                                      I was working on coding a web service in Swift 2. I had built all the needed proxy objects and stubs. As I looped through the returned XML I was dynamically instantiating my objects, which all came from NSObject and using setValue:forKey on them. Every time setValue:forKey tried to set a property it blew up with this error.



                                                                                      I had a switch statement for each type I was dealing with (e.g. Bool?, CShort?, String?) and for each XML node I went through and checked what the type was on the object and then converted the value to that type and attempted to set it with setValue:forKey.



                                                                                      Eventually I started commenting out all these setValue:forKey lines and found that my default switch statement case did work for String?.



                                                                                      I finally figured out that you can't use optional swift types with setValue:forKey unless they have a direct mapping to an Objective-C type like String? or NSNumber?. I ended up changing all CShort? types to NSNumber? since that has a direct mapping. For Bool? in my case it was fine for me to just use Bool and initialize it to false. Others may not have that luxury.



                                                                                      Anyway what a headache that was so hopefully this helps someone else who has a similar problem and keeps getting redirected to this question and saying to themselves, "I am not doing anything in UI!!".



                                                                                      So lastly to reiterate one more time Key-Value Coding does not work with optionals. Below I ended up finding somewhere but I forget where so to whoever posted this I apologize and would give credit if I remembered where I found this but it saved my life:




                                                                                      You cannot use KVC on an Optional Int property, because KVC is Cocoa /
                                                                                      Objective-C, and Objective-C cannot see an Optional Int - it is not
                                                                                      bridged to Objective-C. Objective-C can only see types that are
                                                                                      bridged to Objective-C:



                                                                                      class types that are derived from NSObject



                                                                                      class types that are exposed with @objc



                                                                                      Swift structs that are bridged







                                                                                      share|improve this answer




























                                                                                        7












                                                                                        7








                                                                                        7







                                                                                        Just to add to this, because I was getting this error as well. Going through all these answers most seem to apply to working with the UI and storyboard stuff. I know the original poster did seem to be working with the UI but when searching for possible reasons for this error mostly all questions lead back to this question with those others being closed as duplicates or simply having issues with connecting things in a storyboard so I will add my solution.



                                                                                        I was working on coding a web service in Swift 2. I had built all the needed proxy objects and stubs. As I looped through the returned XML I was dynamically instantiating my objects, which all came from NSObject and using setValue:forKey on them. Every time setValue:forKey tried to set a property it blew up with this error.



                                                                                        I had a switch statement for each type I was dealing with (e.g. Bool?, CShort?, String?) and for each XML node I went through and checked what the type was on the object and then converted the value to that type and attempted to set it with setValue:forKey.



                                                                                        Eventually I started commenting out all these setValue:forKey lines and found that my default switch statement case did work for String?.



                                                                                        I finally figured out that you can't use optional swift types with setValue:forKey unless they have a direct mapping to an Objective-C type like String? or NSNumber?. I ended up changing all CShort? types to NSNumber? since that has a direct mapping. For Bool? in my case it was fine for me to just use Bool and initialize it to false. Others may not have that luxury.



                                                                                        Anyway what a headache that was so hopefully this helps someone else who has a similar problem and keeps getting redirected to this question and saying to themselves, "I am not doing anything in UI!!".



                                                                                        So lastly to reiterate one more time Key-Value Coding does not work with optionals. Below I ended up finding somewhere but I forget where so to whoever posted this I apologize and would give credit if I remembered where I found this but it saved my life:




                                                                                        You cannot use KVC on an Optional Int property, because KVC is Cocoa /
                                                                                        Objective-C, and Objective-C cannot see an Optional Int - it is not
                                                                                        bridged to Objective-C. Objective-C can only see types that are
                                                                                        bridged to Objective-C:



                                                                                        class types that are derived from NSObject



                                                                                        class types that are exposed with @objc



                                                                                        Swift structs that are bridged







                                                                                        share|improve this answer















                                                                                        Just to add to this, because I was getting this error as well. Going through all these answers most seem to apply to working with the UI and storyboard stuff. I know the original poster did seem to be working with the UI but when searching for possible reasons for this error mostly all questions lead back to this question with those others being closed as duplicates or simply having issues with connecting things in a storyboard so I will add my solution.



                                                                                        I was working on coding a web service in Swift 2. I had built all the needed proxy objects and stubs. As I looped through the returned XML I was dynamically instantiating my objects, which all came from NSObject and using setValue:forKey on them. Every time setValue:forKey tried to set a property it blew up with this error.



                                                                                        I had a switch statement for each type I was dealing with (e.g. Bool?, CShort?, String?) and for each XML node I went through and checked what the type was on the object and then converted the value to that type and attempted to set it with setValue:forKey.



                                                                                        Eventually I started commenting out all these setValue:forKey lines and found that my default switch statement case did work for String?.



                                                                                        I finally figured out that you can't use optional swift types with setValue:forKey unless they have a direct mapping to an Objective-C type like String? or NSNumber?. I ended up changing all CShort? types to NSNumber? since that has a direct mapping. For Bool? in my case it was fine for me to just use Bool and initialize it to false. Others may not have that luxury.



                                                                                        Anyway what a headache that was so hopefully this helps someone else who has a similar problem and keeps getting redirected to this question and saying to themselves, "I am not doing anything in UI!!".



                                                                                        So lastly to reiterate one more time Key-Value Coding does not work with optionals. Below I ended up finding somewhere but I forget where so to whoever posted this I apologize and would give credit if I remembered where I found this but it saved my life:




                                                                                        You cannot use KVC on an Optional Int property, because KVC is Cocoa /
                                                                                        Objective-C, and Objective-C cannot see an Optional Int - it is not
                                                                                        bridged to Objective-C. Objective-C can only see types that are
                                                                                        bridged to Objective-C:



                                                                                        class types that are derived from NSObject



                                                                                        class types that are exposed with @objc



                                                                                        Swift structs that are bridged








                                                                                        share|improve this answer














                                                                                        share|improve this answer



                                                                                        share|improve this answer








                                                                                        answered Jan 26 '16 at 15:24


























                                                                                        community wiki





                                                                                        AtheistP3ace
























                                                                                            7














                                                                                            "this class is not key value coding-compliant for the key"
                                                                                            I know its a bit late but my answer is different so I thinks it needs to be posted, I was pushing the second controller in wrong way, Here is sample



                                                                                            Wrong Way to Push Controller



                                                                                            UIViewController* controller = [[UIViewController
                                                                                            alloc]initWithNibName:@"TempViewController" bundle:nil];
                                                                                            [self.navigationController pushViewController:controller animated:true];


                                                                                            Correct way



                                                                                            TempViewController* controller = [[TempViewController
                                                                                            alloc]initWithNibName:@"TempViewController" bundle:nil];
                                                                                            [self.navigationController pushViewController:controller animated:true];


                                                                                            I did not found any answer like above so may be it can help some one having same issue






                                                                                            share|improve this answer






























                                                                                              7














                                                                                              "this class is not key value coding-compliant for the key"
                                                                                              I know its a bit late but my answer is different so I thinks it needs to be posted, I was pushing the second controller in wrong way, Here is sample



                                                                                              Wrong Way to Push Controller



                                                                                              UIViewController* controller = [[UIViewController
                                                                                              alloc]initWithNibName:@"TempViewController" bundle:nil];
                                                                                              [self.navigationController pushViewController:controller animated:true];


                                                                                              Correct way



                                                                                              TempViewController* controller = [[TempViewController
                                                                                              alloc]initWithNibName:@"TempViewController" bundle:nil];
                                                                                              [self.navigationController pushViewController:controller animated:true];


                                                                                              I did not found any answer like above so may be it can help some one having same issue






                                                                                              share|improve this answer




























                                                                                                7












                                                                                                7








                                                                                                7







                                                                                                "this class is not key value coding-compliant for the key"
                                                                                                I know its a bit late but my answer is different so I thinks it needs to be posted, I was pushing the second controller in wrong way, Here is sample



                                                                                                Wrong Way to Push Controller



                                                                                                UIViewController* controller = [[UIViewController
                                                                                                alloc]initWithNibName:@"TempViewController" bundle:nil];
                                                                                                [self.navigationController pushViewController:controller animated:true];


                                                                                                Correct way



                                                                                                TempViewController* controller = [[TempViewController
                                                                                                alloc]initWithNibName:@"TempViewController" bundle:nil];
                                                                                                [self.navigationController pushViewController:controller animated:true];


                                                                                                I did not found any answer like above so may be it can help some one having same issue






                                                                                                share|improve this answer















                                                                                                "this class is not key value coding-compliant for the key"
                                                                                                I know its a bit late but my answer is different so I thinks it needs to be posted, I was pushing the second controller in wrong way, Here is sample



                                                                                                Wrong Way to Push Controller



                                                                                                UIViewController* controller = [[UIViewController
                                                                                                alloc]initWithNibName:@"TempViewController" bundle:nil];
                                                                                                [self.navigationController pushViewController:controller animated:true];


                                                                                                Correct way



                                                                                                TempViewController* controller = [[TempViewController
                                                                                                alloc]initWithNibName:@"TempViewController" bundle:nil];
                                                                                                [self.navigationController pushViewController:controller animated:true];


                                                                                                I did not found any answer like above so may be it can help some one having same issue







                                                                                                share|improve this answer














                                                                                                share|improve this answer



                                                                                                share|improve this answer








                                                                                                edited Sep 20 '16 at 13:02


























                                                                                                community wiki





                                                                                                2 revs, 2 users 78%
                                                                                                Muhammad Ammad
























                                                                                                    6














                                                                                                    I had the same symptom. The root cause was that the "Target Membership" for my source file was not set to the correct target. I assume that means my class wouldn't get built and included in my app.



                                                                                                    To correct it:




                                                                                                    1. Highlight your .m file.

                                                                                                    2. In the right pane, select the File Inspector.

                                                                                                    3. Under the "Target Membership" section, make sure the appropriate build target is checked.


                                                                                                    Hope this helps somebody out there.






                                                                                                    share|improve this answer






























                                                                                                      6














                                                                                                      I had the same symptom. The root cause was that the "Target Membership" for my source file was not set to the correct target. I assume that means my class wouldn't get built and included in my app.



                                                                                                      To correct it:




                                                                                                      1. Highlight your .m file.

                                                                                                      2. In the right pane, select the File Inspector.

                                                                                                      3. Under the "Target Membership" section, make sure the appropriate build target is checked.


                                                                                                      Hope this helps somebody out there.






                                                                                                      share|improve this answer




























                                                                                                        6












                                                                                                        6








                                                                                                        6







                                                                                                        I had the same symptom. The root cause was that the "Target Membership" for my source file was not set to the correct target. I assume that means my class wouldn't get built and included in my app.



                                                                                                        To correct it:




                                                                                                        1. Highlight your .m file.

                                                                                                        2. In the right pane, select the File Inspector.

                                                                                                        3. Under the "Target Membership" section, make sure the appropriate build target is checked.


                                                                                                        Hope this helps somebody out there.






                                                                                                        share|improve this answer















                                                                                                        I had the same symptom. The root cause was that the "Target Membership" for my source file was not set to the correct target. I assume that means my class wouldn't get built and included in my app.



                                                                                                        To correct it:




                                                                                                        1. Highlight your .m file.

                                                                                                        2. In the right pane, select the File Inspector.

                                                                                                        3. Under the "Target Membership" section, make sure the appropriate build target is checked.


                                                                                                        Hope this helps somebody out there.







                                                                                                        share|improve this answer














                                                                                                        share|improve this answer



                                                                                                        share|improve this answer








                                                                                                        answered Sep 24 '14 at 21:11


























                                                                                                        community wiki





                                                                                                        Mike M. Lin
























                                                                                                            5














                                                                                                            In my case. I didn't have missing outlets in xib-files after merging.




                                                                                                            Shift + Command + K




                                                                                                            solved my problem. I cleaned my project and rebuilt.






                                                                                                            share|improve this answer






























                                                                                                              5














                                                                                                              In my case. I didn't have missing outlets in xib-files after merging.




                                                                                                              Shift + Command + K




                                                                                                              solved my problem. I cleaned my project and rebuilt.






                                                                                                              share|improve this answer




























                                                                                                                5












                                                                                                                5








                                                                                                                5







                                                                                                                In my case. I didn't have missing outlets in xib-files after merging.




                                                                                                                Shift + Command + K




                                                                                                                solved my problem. I cleaned my project and rebuilt.






                                                                                                                share|improve this answer















                                                                                                                In my case. I didn't have missing outlets in xib-files after merging.




                                                                                                                Shift + Command + K




                                                                                                                solved my problem. I cleaned my project and rebuilt.







                                                                                                                share|improve this answer














                                                                                                                share|improve this answer



                                                                                                                share|improve this answer








                                                                                                                edited Oct 2 '15 at 9:23


























                                                                                                                community wiki





                                                                                                                2 revs
                                                                                                                user123456
























                                                                                                                    5














                                                                                                                    If you have a custom UIViewController subclass with IBOutlets that are causing problems the only set of steps I found to actually get rid of the error were



                                                                                                                    .1 Change the class to UIViewController



                                                                                                                    .2 Disconnect all the outlets (they will all have the yellow warning triangle now) - it may be enough just to disconnect the problematic outlet(s).



                                                                                                                    .3 Do all the standard steps - ↑⌘K, delete Derived Data (, prayer mats, worry beads)



                                                                                                                    .4 Launch the app - go to the problematic scene.



                                                                                                                    .5 Kill the app, go back to Interface Builder change the class back to your custom class name.



                                                                                                                    .6 Reconnect your outlets.



                                                                                                                    Launch the app & this will normally have cleared up the key-value compliance issues.






                                                                                                                    share|improve this answer






























                                                                                                                      5














                                                                                                                      If you have a custom UIViewController subclass with IBOutlets that are causing problems the only set of steps I found to actually get rid of the error were



                                                                                                                      .1 Change the class to UIViewController



                                                                                                                      .2 Disconnect all the outlets (they will all have the yellow warning triangle now) - it may be enough just to disconnect the problematic outlet(s).



                                                                                                                      .3 Do all the standard steps - ↑⌘K, delete Derived Data (, prayer mats, worry beads)



                                                                                                                      .4 Launch the app - go to the problematic scene.



                                                                                                                      .5 Kill the app, go back to Interface Builder change the class back to your custom class name.



                                                                                                                      .6 Reconnect your outlets.



                                                                                                                      Launch the app & this will normally have cleared up the key-value compliance issues.






                                                                                                                      share|improve this answer




























                                                                                                                        5












                                                                                                                        5








                                                                                                                        5







                                                                                                                        If you have a custom UIViewController subclass with IBOutlets that are causing problems the only set of steps I found to actually get rid of the error were



                                                                                                                        .1 Change the class to UIViewController



                                                                                                                        .2 Disconnect all the outlets (they will all have the yellow warning triangle now) - it may be enough just to disconnect the problematic outlet(s).



                                                                                                                        .3 Do all the standard steps - ↑⌘K, delete Derived Data (, prayer mats, worry beads)



                                                                                                                        .4 Launch the app - go to the problematic scene.



                                                                                                                        .5 Kill the app, go back to Interface Builder change the class back to your custom class name.



                                                                                                                        .6 Reconnect your outlets.



                                                                                                                        Launch the app & this will normally have cleared up the key-value compliance issues.






                                                                                                                        share|improve this answer















                                                                                                                        If you have a custom UIViewController subclass with IBOutlets that are causing problems the only set of steps I found to actually get rid of the error were



                                                                                                                        .1 Change the class to UIViewController



                                                                                                                        .2 Disconnect all the outlets (they will all have the yellow warning triangle now) - it may be enough just to disconnect the problematic outlet(s).



                                                                                                                        .3 Do all the standard steps - ↑⌘K, delete Derived Data (, prayer mats, worry beads)



                                                                                                                        .4 Launch the app - go to the problematic scene.



                                                                                                                        .5 Kill the app, go back to Interface Builder change the class back to your custom class name.



                                                                                                                        .6 Reconnect your outlets.



                                                                                                                        Launch the app & this will normally have cleared up the key-value compliance issues.







                                                                                                                        share|improve this answer














                                                                                                                        share|improve this answer



                                                                                                                        share|improve this answer








                                                                                                                        answered Jul 7 '16 at 13:38


























                                                                                                                        community wiki





                                                                                                                        Damo
























                                                                                                                            4














                                                                                                                            In my case, this was caused by referencing the wrong Nib:



                                                                                                                            BMTester *viewController = [[BMTester alloc] initWithNibName:@"WrongNibName" bundle:nil];





                                                                                                                            share|improve this answer





















                                                                                                                            • 1





                                                                                                                              Happens to me when I rename the view controller's class and forget that the the nib name needs to change too. Since the nib name is just a string, there's no compiler error.

                                                                                                                              – kris
                                                                                                                              Jul 12 '15 at 21:47
















                                                                                                                            4














                                                                                                                            In my case, this was caused by referencing the wrong Nib:



                                                                                                                            BMTester *viewController = [[BMTester alloc] initWithNibName:@"WrongNibName" bundle:nil];





                                                                                                                            share|improve this answer





















                                                                                                                            • 1





                                                                                                                              Happens to me when I rename the view controller's class and forget that the the nib name needs to change too. Since the nib name is just a string, there's no compiler error.

                                                                                                                              – kris
                                                                                                                              Jul 12 '15 at 21:47














                                                                                                                            4












                                                                                                                            4








                                                                                                                            4







                                                                                                                            In my case, this was caused by referencing the wrong Nib:



                                                                                                                            BMTester *viewController = [[BMTester alloc] initWithNibName:@"WrongNibName" bundle:nil];





                                                                                                                            share|improve this answer















                                                                                                                            In my case, this was caused by referencing the wrong Nib:



                                                                                                                            BMTester *viewController = [[BMTester alloc] initWithNibName:@"WrongNibName" bundle:nil];






                                                                                                                            share|improve this answer














                                                                                                                            share|improve this answer



                                                                                                                            share|improve this answer








                                                                                                                            answered May 14 '14 at 13:39


























                                                                                                                            community wiki





                                                                                                                            wspruijt









                                                                                                                            • 1





                                                                                                                              Happens to me when I rename the view controller's class and forget that the the nib name needs to change too. Since the nib name is just a string, there's no compiler error.

                                                                                                                              – kris
                                                                                                                              Jul 12 '15 at 21:47














                                                                                                                            • 1





                                                                                                                              Happens to me when I rename the view controller's class and forget that the the nib name needs to change too. Since the nib name is just a string, there's no compiler error.

                                                                                                                              – kris
                                                                                                                              Jul 12 '15 at 21:47








                                                                                                                            1




                                                                                                                            1





                                                                                                                            Happens to me when I rename the view controller's class and forget that the the nib name needs to change too. Since the nib name is just a string, there's no compiler error.

                                                                                                                            – kris
                                                                                                                            Jul 12 '15 at 21:47





                                                                                                                            Happens to me when I rename the view controller's class and forget that the the nib name needs to change too. Since the nib name is just a string, there's no compiler error.

                                                                                                                            – kris
                                                                                                                            Jul 12 '15 at 21:47











                                                                                                                            3














                                                                                                                            I was getting this error with storyboards. The above solution didn't seem to be the problem so I ended up deleting the view controller and adding it back in again (and of course reconnecting the segue and reassigning the class) which fixed it. I don't know what it really was, but I had renamed the associated view controller class shortly before this started, so maybe that had hosed something.






                                                                                                                            share|improve this answer


























                                                                                                                            • I got this error again. This time I created a new empty table view controller with my class assigned to it, leaving the non-working one alone, and moved the segue to it. This worked. I then slowly copied every element in the view over until it failed again. This time the problem turned out to be I had assigned some "User Defined Runtime Attributes" for a picker (I was thinking I could use them to initialize the picker so I wouldn't have to do it in code, no idea if that's possible). Removing that fixed the problem. This error is really horrible, I hope it's improved in a future release!

                                                                                                                              – Symmetric
                                                                                                                              Jan 7 '12 at 4:39
















                                                                                                                            3














                                                                                                                            I was getting this error with storyboards. The above solution didn't seem to be the problem so I ended up deleting the view controller and adding it back in again (and of course reconnecting the segue and reassigning the class) which fixed it. I don't know what it really was, but I had renamed the associated view controller class shortly before this started, so maybe that had hosed something.






                                                                                                                            share|improve this answer


























                                                                                                                            • I got this error again. This time I created a new empty table view controller with my class assigned to it, leaving the non-working one alone, and moved the segue to it. This worked. I then slowly copied every element in the view over until it failed again. This time the problem turned out to be I had assigned some "User Defined Runtime Attributes" for a picker (I was thinking I could use them to initialize the picker so I wouldn't have to do it in code, no idea if that's possible). Removing that fixed the problem. This error is really horrible, I hope it's improved in a future release!

                                                                                                                              – Symmetric
                                                                                                                              Jan 7 '12 at 4:39














                                                                                                                            3












                                                                                                                            3








                                                                                                                            3







                                                                                                                            I was getting this error with storyboards. The above solution didn't seem to be the problem so I ended up deleting the view controller and adding it back in again (and of course reconnecting the segue and reassigning the class) which fixed it. I don't know what it really was, but I had renamed the associated view controller class shortly before this started, so maybe that had hosed something.






                                                                                                                            share|improve this answer















                                                                                                                            I was getting this error with storyboards. The above solution didn't seem to be the problem so I ended up deleting the view controller and adding it back in again (and of course reconnecting the segue and reassigning the class) which fixed it. I don't know what it really was, but I had renamed the associated view controller class shortly before this started, so maybe that had hosed something.







                                                                                                                            share|improve this answer














                                                                                                                            share|improve this answer



                                                                                                                            share|improve this answer








                                                                                                                            answered Oct 28 '11 at 3:10


























                                                                                                                            community wiki





                                                                                                                            Symmetric














                                                                                                                            • I got this error again. This time I created a new empty table view controller with my class assigned to it, leaving the non-working one alone, and moved the segue to it. This worked. I then slowly copied every element in the view over until it failed again. This time the problem turned out to be I had assigned some "User Defined Runtime Attributes" for a picker (I was thinking I could use them to initialize the picker so I wouldn't have to do it in code, no idea if that's possible). Removing that fixed the problem. This error is really horrible, I hope it's improved in a future release!

                                                                                                                              – Symmetric
                                                                                                                              Jan 7 '12 at 4:39



















                                                                                                                            • I got this error again. This time I created a new empty table view controller with my class assigned to it, leaving the non-working one alone, and moved the segue to it. This worked. I then slowly copied every element in the view over until it failed again. This time the problem turned out to be I had assigned some "User Defined Runtime Attributes" for a picker (I was thinking I could use them to initialize the picker so I wouldn't have to do it in code, no idea if that's possible). Removing that fixed the problem. This error is really horrible, I hope it's improved in a future release!

                                                                                                                              – Symmetric
                                                                                                                              Jan 7 '12 at 4:39

















                                                                                                                            I got this error again. This time I created a new empty table view controller with my class assigned to it, leaving the non-working one alone, and moved the segue to it. This worked. I then slowly copied every element in the view over until it failed again. This time the problem turned out to be I had assigned some "User Defined Runtime Attributes" for a picker (I was thinking I could use them to initialize the picker so I wouldn't have to do it in code, no idea if that's possible). Removing that fixed the problem. This error is really horrible, I hope it's improved in a future release!

                                                                                                                            – Symmetric
                                                                                                                            Jan 7 '12 at 4:39





                                                                                                                            I got this error again. This time I created a new empty table view controller with my class assigned to it, leaving the non-working one alone, and moved the segue to it. This worked. I then slowly copied every element in the view over until it failed again. This time the problem turned out to be I had assigned some "User Defined Runtime Attributes" for a picker (I was thinking I could use them to initialize the picker so I wouldn't have to do it in code, no idea if that's possible). Removing that fixed the problem. This error is really horrible, I hope it's improved in a future release!

                                                                                                                            – Symmetric
                                                                                                                            Jan 7 '12 at 4:39











                                                                                                                            3














                                                                                                                            I got the same problem. I did resetting the simulator. Removing and adding button control. and finally made a clean. :) Thanks to stack overflow. Some how my code became ok and starting working.






                                                                                                                            share|improve this answer






























                                                                                                                              3














                                                                                                                              I got the same problem. I did resetting the simulator. Removing and adding button control. and finally made a clean. :) Thanks to stack overflow. Some how my code became ok and starting working.






                                                                                                                              share|improve this answer




























                                                                                                                                3












                                                                                                                                3








                                                                                                                                3







                                                                                                                                I got the same problem. I did resetting the simulator. Removing and adding button control. and finally made a clean. :) Thanks to stack overflow. Some how my code became ok and starting working.






                                                                                                                                share|improve this answer















                                                                                                                                I got the same problem. I did resetting the simulator. Removing and adding button control. and finally made a clean. :) Thanks to stack overflow. Some how my code became ok and starting working.







                                                                                                                                share|improve this answer














                                                                                                                                share|improve this answer



                                                                                                                                share|improve this answer








                                                                                                                                answered Feb 1 '12 at 10:32


























                                                                                                                                community wiki





                                                                                                                                priya























                                                                                                                                    1 2
                                                                                                                                    3
                                                                                                                                    next




                                                                                                                                    protected by Brad Larson Apr 16 '14 at 21:28



                                                                                                                                    Thank you for your interest in this question.
                                                                                                                                    Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



                                                                                                                                    Would you like to answer one of these unanswered questions instead?



                                                                                                                                    Popular posts from this blog

                                                                                                                                    Liquibase includeAll doesn't find base path

                                                                                                                                    How to use setInterval in EJS file?

                                                                                                                                    Petrus Granier-Deferre