Search code examples
iosobjective-cswiftcore-datarestkit

Filtering Server Response RestKit + CoreData


Im using RestKit+CoreData. And i always get response code 200 from server. And I don't need all responses to save into core data, Is there any way to filter response ?


Solution

  • Yes. You can use the addFetchRequestBlock to give a fetch request with predicate, by which you can avoid saving unwanted objects from responses.

    Reference : http://cocoadocs.org/docsets/RestKit/0.24.0/Classes/RKManagedObjectRequestOperation.html