Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8489231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T21:46:18+00:00 2026-06-10T21:46:18+00:00

I use RestKit to receive data from my web server and storing it in

  • 0

I use RestKit to receive data from my web server and storing it in Core Data.

Everything works fine, also the object mapping.

But now I have a question/problem.
I want to sync my device with the data from the web server.
The way with new or updated objects is clear, because RestKit controls it for me. But how to delete objects in Core Data? There is a way using the DELETE method. But what is, if some objects were deleted on the server?

I want to make a GET request with the timestamp of the last sync to receive all data changes (delta).

  • new objects (OK)
  • modified objects (OK)
  • deleted objects (How?)

How to delete objects in Core Data with JSON payload from the server.
Is there a possibility to prevent the save when a delete attribute of an object in JSON is set? Is there a way to delete this object from Core Data.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T21:46:20+00:00Added an answer on June 10, 2026 at 9:46 pm

    Solution n°1: The removed attribute

    Imho it wouldn’t be a good solution to remove every local objects that doesn’t appear in the request reponse. So I just add an attribute removed (not deleted because it’s reserved by Core Data) and only display Object[removed=FALSE].

    In a fetch request, it would be:

    removed == FALSE
    

    Solution n°2: what-should-I-delete?

    You could make a simple page in your API that would indicate what to delete on your application. For instance:

    [
      {'type': 'post', 'id': 5},
      {'type': 'comment', 'id': 10},
    ]
    

    Then, you would fetch objects by postID or commentID and delete them from the store. You’ll have to find a way to confirm the deletion to the server, as the list will grow.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use RestKit with Object-mapping. This runs asyncronus and after receiving the Data from
I want to use RestKit to parse XML data from our servers. Downloading and
After reading the Object Mapping-Guide on GitHub for RestKit my problem didn't disappear, so
As I understand it RestKit provides integration with Apple’s Core Data framework, making and
Using RestKit with Core Data I'm providing offline support when the user adds, edits
Here is my problem: I want to use core data - speed and connectivity
I am using RestKit to drive interactions with my web server. I am trying
I am trying to use RestKit for communicating with a web service providing news
I'm trying to use JSON parsing from RestKit, but I'm receiving the following compile
I'm using RestKit to pull data from the Foursquare API into my iphone app,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.