ios - Restkit edit inserting in coredata -


i use restkit consume web service ,, when data want add other parameters, searched , found should implement function called willsave don't know way

nsdictionary *params = [nsdictionary dictionarywithobjectsandkeys:brandid,@"brandid",categoryid,@"categoryid", nil];  [[rkobjectmanager sharedmanager] postobject:nil path:@"/mywebservice" parameters:params success:^(rkobjectrequestoperation *operation, rkmappingresult *mappingresult) {      [self getproductslist];  } failure:^(rkobjectrequestoperation *operation, nserror *error) {  }]; 

you don't need use willsave, depends want do...

you can use success block, iterate through results provided in mappingresult, make changes , save main thread moc persistent store.

willsave method on nsmanagedobject. so, implement on managed object subclasses. result in changes being saved part of mapping process, it's useful derived values / time-stamping.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -