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

  • SEARCH
  • Home
  • 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 4007370
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T08:37:29+00:00 2026-05-20T08:37:29+00:00

I am fighting with CoreData again and i need your help :P I am

  • 0

I am fighting with CoreData again and i need your help 😛

I am writing a RSS reader.
Design is based on Apple TopSongs example using libxml2 library.

When my application is up I am checking to see when was the last update. If it was more than 1 hour ago i remove the current Persistent store and download everything again.

if ([[NSFileManager defaultManager] fileExistsAtPath:self.persistentStorePath]) {
        NSError *error = nil;
        BOOL oldStoreRemovalSuccess = [[NSFileManager defaultManager] removeItemAtPath:self.persistentStorePath error:&error];
        NSAssert3(oldStoreRemovalSuccess, @"Unhandled error adding persistent store in %s at line %d: %@", __FUNCTION__, __LINE__, [error localizedDescription]);
    }

I can see that the local sql file was deleted.

Now i am creating some NSOperations to download information from the feeds in the background.

So far everything works great.

Like every RSS feed, there is an update button which suppose to check for changes and update the coreData.
For starter i decided i will delete everything and re-download everything (not efficent i know, but the RSS feed does not have guid and i need to implement a hash function to figure if there were any changes).

So what i’m doing is basically calling the same code as above to delete the store..
re-downloading all RSS feeds again (same logic when the application was first loaded)

I am reloading the tables but i can still see the same data on the tableView, everything remained untouched.

I decided to go even further, and to delete the store without downloading content.

if ([[NSFileManager defaultManager] fileExistsAtPath:app.persistentStorePath]) {
    NSError *error = nil;
    BOOL oldStoreRemovalSuccess = [[NSFileManager defaultManager] removeItemAtPath:app.persistentStorePath error:&error];
    NSAssert3(oldStoreRemovalSuccess, @"Unhandled error adding persistent store in %s at line %d: %@", __FUNCTION__, __LINE__, [error localizedDescription]);
}

    [self.managedObjectContext save:&err];
    [self.fetchedResultsController performFetch:&error];
    [self.tableView reloadData]

I expected to see empty tables but the data was still there.

How is this possible ? i deleted the store, re-fetched and reloaded the data.

What am i doing wrong?

  • 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-05-20T08:37:29+00:00Added an answer on May 20, 2026 at 8:37 am

    Hey, don’t delete the whole Core Data database…delete every entry in the Core Data database and not the whole base itself. You can delete an object from Core Data database by:

    [context deleteObject:aCoreDataObject];
    

    Oh one more thing…if you change your Core Data database, that won’t be reflected in the tableview. If you want to see changes you need to call for example [tableView reloadData];

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

Sidebar

Related Questions

Okay still fighting with doing some SqlCacheDependecy in my Asp.net MVC application I got
We've been fighting with HAProxy for a few days now in Amazon EC2; the
I'm fighting here with System.Printing namespace of .net framework. And what i always saw
I have fighting to get a IN parameter to work inside of a LIKE
Been fighting with Mercurial's .hgignore for a while under Windows. I have a folder
I'm fighting with linq trying to learn the syntax and I can't figure out
I've been fighting with this for a few days now and it looks like
I'm fighting the spaces bug in Java's Runtime exec method. Here's what's unique about
I've been fighting against IE8's compatibility mode all day and I'm about to chuck
I'm fighting with creation of several forms in MS Access 2007. I accomplished 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.