I have integrated TokBox for chatting functionality in my iOS app.
I have used this link
this is my code
- (void)sessionDidConnect:(OTSession*)session {
// When we've connected to the session, we can create the chat component.
// crash on following line
_textChat = [[OTKTextChatComponent alloc] init];
_textChat.delegate = self;
[_textChat setMaxLength:1050];
[_textChat setSenderId:session.connection.connectionId alias:session.connection.data];
CGRect r = self.view.bounds;
r.origin.y += 20;
r.size.height -= 20;
[_textChat.view setFrame:r];
[self.view addSubview:_textChat.view];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillHide:) name:UIKeyboardWillHideNotification object:nil];
// fade in
_textChat.view.alpha = 0;
[UIView animateWithDuration:0.5 animations:^() {
//_connectingLabel.alpha = 0;
_textChat.view.alpha = 1;
}];
}
This demo is working perfectly. But when I am trying to integrate it in my project. It gives following error :
Unknown class OTKTextChatView in Interface Builder file.
*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIView 0x7f8c43835fa0> setValue:forUndefinedKey:]:
this class is not key value coding-compliant for the key countLabel.'
*** First throw call stack:
please help me