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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:50:12+00:00 2026-06-13T23:50:12+00:00

I have data that is persisted on the device that needs to sync with

  • 0

I have data that is persisted on the device that needs to sync with my my server, in terms of design am I on the right track?

I have a model with a method to return my local objects, let’s call it [model objects]';

Within this method it returns the local objects immediately but I’d also like to check if the server needs to update any of these objects so in the background thread I run a method that uses an async NSUrlConnection that will return the JSON of each object that needs to be updated in which I will save that to core data. In the Table View Controller I would set a KVO to observe when the values changed for the updatedObjects then reload the objects displayed in the objectTableView.

Question: Is this the correct way to handle this? Am I missing something? Can I improve this somehow?

I am also thinking of disabling the UITableViewCells of the objects that are being updated and showing a UIActivityIndicator during the downloading and saving stages but I’m not sure if this will cause any race conditions in the UX.

Hopefully this was explained well enough for you to understand, if you have any questions I will try to reply immediately.

  • 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-13T23:50:13+00:00Added an answer on June 13, 2026 at 11:50 pm

    There is support for this sort of problem within CoreData. And there are a variety of approaches.

    The basic gist is that you create a new context in your background thread for your async web call, then comparing your local data to the new received data you manage updates. Then you perform a merge from your thread context to your main context. At this point you can receive notification of the updated data in CoreData and update your views.

    You can even use NSFetchedResultsController to simplify this even more.

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

Sidebar

Related Questions

I have created a custom Server control that processes some data, stores that data
I have a data layer project which receives a byte array that needs to
I have some EJBs that use Hibernate to persist data to the database. I
I have data that is organized in kind of a key-key format, rather than
I have data that looks like this: #info #info2 1:SRX004541 Submitter: UT-MGS, UT-MGS Study:
I have data that I would like to compute some statistics with. The data
For an XML file I am creating I have data that contains a bullet
I have some data that is stored in a TIMESTAMP(6) WITH TIMEZONE column in
I have some data that won't printf.... echo works, but not printf There is
I have some data that I would like to visualize. Each byte of the

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.