I have developed a chat application using XMPPFramework, but i'm facing a problem and now i'm stuck. I use NSFetchedResultsController to show the list of users saved on my chat, but now i have to show extra informations such as gender and placeId. I tried the follow:
Add the properties in XMPPUserCoreDataStorageObject.h and then:
- (void)xmppRoster:(XMPPRoster *)sender didReceivePresenceSubscriptionRequest:(XMPPPresence *)presence
{
XMPPUserCoreDataStorageObject *user = [self.xmppRosterStorage userForJID:[presence from]
xmppStream:self.xmppStream
managedObjectContext:[self managedObjectContext_roster]];
user.venueId = [presence attributeStringValueForName:@"KEY_VENUEID"];
user.gender = [presence attributeStringValueForName:@"KEY_GENDER"];
NSError *error = nil;
[[self managedObjectContext_roster] save:&error];
}
But when I try to use these properties, the app crashes (unrecognized selector). Is it possible to add custom properties to XMPPUserCoreDataStorageObject? What am I doing wrong? I saw a lot of tutorials in internet and followed the demo code of XMPPFramework, but didn't find anything about it.
Thanks in advance.
XMPPUserCoreDataStorageObject.h is autogenerated file from CoreData model. You should add properties to model and then regenerate headers.