Reputation: 105
I am trying to send and receive message using XMPP framework. I used XMPPStream class for sending and receiving message. My code to receive message is
- (void)xmppStream:(XMPPStream *)sender didReceiveMessage:(XMPPMessage *)message {
NSString *msg = [[message elementForName:@"body"] stringValue];
NSString *from = [[message attributeForName:@"from"] stringValue];
NSMutableDictionary *m = [[NSMutableDictionary alloc] init];
[m setObject:msg forKey:@"msg"];
[m setObject:from forKey:@"sender"];
[_messageDelegate newMessageReceived:m];
[m release];
}
When i build i get a linker error
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_XMPPStream", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_XMPPPresence", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Please guide me to solve this issue.
Thanks in advance.
Upvotes: 0
Views: 493
Reputation: 100
It is the problem with adding libraries to your project. Remove all libraries and add it again. Add libidn.a library in the xmppframework and compile it. Follow all the instructions in this link. github.com/robbiehanson/XMPPFramework/wiki/GettingStarted_iOS
Upvotes: 1