synchronization - Simperium on iOS not syncing data correctly -
i'm testing data synchronization on 2 ipads logged in same simperium user.
- if create object named object1 on ipad1 synchronizes ipad2.
- if create object named object2 on ipad2 synchronizes ipad1
- if modify object1 on ipad2 synchronizes ipad1
- if modify object2 on ipad1 synchronizes ipad2
- if modify object1 on ipad1 not synchronize change ipad2 although push change simperium's data store
- if modify object2 on ipad2 not synchronize change ipad1 although push change simperium's data store
i running simperium 0.8.3. updated simperium 0.8.12 , problem still exists.
what can troubleshoot issue? bug?
i think figured out. had method created added object core data , wrote nil values data not supplied. example:
+(bool) addactivity:(nsnumber *)identifier item_id:(nsnumber *)item_id { appdelegate *appdelegate = (appdelegate *)[[uiapplication sharedapplication] delegate]; nsmanagedobjectcontext *context = appdelegate.managedobjectcontext; nsentitydescription *entity = [nsentitydescription entityforname:@"activity" inmanagedobjectcontext:context]; activity *a = [nsentitydescription insertnewobjectforentityforname:[entity name] inmanagedobjectcontext:context]; [a setvalue:identifier forkey:@"id"]; [a setvalue:item_id forkey:@"item_id"]; // save context. nserror *error = nil; if (![context save:&error]) { nslog(@"unresolved error %@, %@", error, [error userinfo]); return no; } else { return yes; } return no; }
apparently spdiffer doesn't since kept on throwing errors like:
transform diff ghost member (ghost <spghost: 0x7fba9617dae0>, memberdata { <data> }) doesn't exist (item_id): { o = "+"; v = 0; }
when item_id exist, except had nil value written spdiffer couldn't tell type. added if statements code don't write nil values , ignore field.
if (item_id) { [a setvalue:item_id forkey:@"item_id"]; }
i hope makes sense , helps else out.
Comments
Post a Comment