0

I'm attempting to call/load an instance of JSQMessagesViewController I'm reusing from a previous/different project and I'm getting the following error message:

 "This class is not key value coding-compliant for the key connectionView."

I believe the issue is being caused by an issue in the following (a part of my WidgetsVC.m file):

  case 2:{

        JSQChat *fcvc = [[JSQChat alloc] initWithNibName:@"JSQChat" bundle:[NSBundle mainBundle]];
        [appDelegate.chatNavController setViewControllers:[NSArray arrayWithObject:fcvc]
                                                   animated:NO];
        appDelegate.cpTabBarController .selectedIndex = 2;


        break;

I've tried many of the suggestions commonly associated with this error and none of them seem to resolve it (uninstalling the app, bad connection in XIB, checking to ensure Targets > Summary > iPhone/iPod Deployment Info > Main Interface is blank, etc. etc.):

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

Community
  • 1
  • 1
  • The second answer in the other question you linked is probably what you need to look into. – rmaddy Feb 16 '17 at 17:51
  • I've looked at the 'Outlets' for JSQChat.xib and I don't have a little ! or anything else indicating something is broken as mentioned in the second answer... (any other ideas/suggestions are appreciated) – Droidthusiast Feb 16 '17 at 17:56

1 Answers1

0

You are trying to create a JSQChat object from the JSQChat.xib file. The xib specifies that the object you create will have a connectionView outlet. JSQChat doesn't have such an outlet defined.

Probably the reason that you don't see anything broken in the visual editor is that you've defined the xib's file owner to be HomeVC, with does contain:

    IBOutlet UIView *connectionView;
Phillip Mills
  • 30,888
  • 4
  • 42
  • 57