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 7904071
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:54:14+00:00 2026-06-03T09:54:14+00:00

Using RestKit with Core Data I’m providing offline support when the user adds, edits

  • 0

Using RestKit with Core Data I’m providing offline support when the user adds, edits or deletes objects without an internet connection by flagging the objects and saving them with Core Data.

If the internet is available again, I’ll fetch all added/edited/deleted objects, save them in arrays and right know use the normal methods and loop for each item to put them on the server.

List of arrays
– fetchedAddedCompanies
– fetchedEditedCompanies
– fetchedAddedContacts
– fetchedEditedContacts
– fetchedDeletedContacts

Init method (Example for edited companies)

// Added Companies
...

// Edited Companies
for (Company *tempObj in fetchedAddedCompanies)
{
    // Find keys for selected languages
    [self updateAccountToServer:tempObj:addCompanyContext];
}

// ...

At the end of updateAccountToServer I post the object (self.company) with it’s mapping to the server.

...
[objectManager postObject:self.company mapResponseWith:[companyMapper inverseMapping] delegate:self];
...

Question

I’m searching for a more efficient solution when the user did update a few objects and – that the special one – did add a few new objects because in contrast to all editing/deleting methods the server returns an ID for each new created object that will be stored.

1) Avoid using e.g. updateAccountToServer for each edited object and send an array of objects instead
2) Using the RKRequestQueue together with the RKObjectManager (regarding this question and a good answer)

In my opinion 1) will be hard to implement because the resourcePath for each request contains a unique ID, so I’ve tried 2) but missing the possibility to bind the mapping for each request using

[syncQueue addRequest:[[RKObjectManager sharedManager] objectLoaderWithResourcePath:tempString delegate:self]]; 

Thanks for your ideas!

  • 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-03T09:54:15+00:00Added an answer on June 3, 2026 at 9:54 am

    Myself and a few others are actively working on a development branch to integrate this into RestKit automatically.

    We are implementing a synchronization manager inside of RK that watches the NSManagedObjectContext for changes, and if the network is unavailable, queues those requests until the network comes back.

    We’d love to have more help/ideas on the code, so if you could tell us more about your use case on this page:

    https://github.com/RestKit/RestKit/pull/573

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

Sidebar

Related Questions

I'm using RestKit to grab objects from my RoR service and using CoreData to
Using images with Core Data isn't a problem. There are a lot of examples
I'm using the RestKit iOS package to allow a user to pull info from
i am using coredata and restkit to map data. here is the json response
As I understand it RestKit provides integration with Apple’s Core Data framework, making and
Im using Restkit OM2 to take in a json and map to objects on
I'm developing an app in IOS using RestKit . Data is retrieved successfully but
I am having trouble mapping a JSON response to objects using RestKit and Objective-C.
Im using restkit and push notifications and I have also built the interface, so
I'm using RestKit to load a gzipped JSON with RKRequest: RKRequest* request = [[RKClient

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.