ios - XMPPFramework - Message Archiving in Core Data "" -
ios - XMPPFramework - Message Archiving in Core Data "<data: fault>" -
first post me. i've searched through lot of questions , answers in regards storing/archiving messages in core info , can't seem crack it.
i doing silly, help appreciated.
setup stream here:
-(void)setupstream { xmppstream = [[xmppstream alloc] init]; [xmppstream adddelegate:self delegatequeue:dispatch_get_main_queue()]; xmppmessagearchivingcoredatastorage *xmppmessagearchivingstorage = [xmppmessagearchivingcoredatastorage sharedinstance]; xmppmessagearchiving *xmppmessagearchivingmodule = [[xmppmessagearchiving alloc] initwithmessagearchivingstorage:xmppmessagearchivingstorage]; [xmppmessagearchivingmodule setclientsidemessagearchivingonly:yes]; [xmppmessagearchivingmodule activate:xmppstream]; [xmppmessagearchivingmodule adddelegate:self delegatequeue:dispatch_get_main_queue()]; }
attempting test archiving here:
-(void) testmessagearchive { xmppmessagearchivingcoredatastorage *storage = [xmppmessagearchivingcoredatastorage sharedinstance]; nsmanagedobjectcontext *moc = [storage mainthreadmanagedobjectcontext]; nsentitydescription *entitydescription = [nsentitydescription entityforname:@"xmppmessagearchiving_contact_coredataobject" inmanagedobjectcontext:moc]; nsfetchrequest *request = [[nsfetchrequest alloc]init]; [request setentity:entitydescription]; nserror *error; nsarray *messages = [moc executefetchrequest:request error:&error]; }
the issue can't seem sensible info messages object. contents below. need bury downwards deeper message text , sender? messages array has 1 object in it, right since sent 1 message. item in message array is:
> <_pfarray 0x10f0021a0>( <xmppmessagearchiving_contact_coredataobject: > 0x1099de1b0> (entity: xmppmessagearchiving_contact_coredataobject; id: > 0xd000000000040000 > <x-coredata://1013d7f5-a511-45f0-b719-13eef1dd32a3/xmppmessagearchiving_contact_coredataobject/p1> > ; data: <fault>) )
ios core-data xmpp xmppframework
Comments
Post a Comment