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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:26:32+00:00 2026-05-23T11:26:32+00:00

I am watching/doing the iTunes U Stanford iPhone course. (provided for free!). I am

  • 0

I am watching/doing the iTunes U Stanford iPhone course. (provided for free!). I am on the paparazzi program trying to figure out Core Data.

Below is how I save data into coreData, how do I verify this information actually got saved?

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    FlickrFetcher *ff = [FlickrFetcher sharedInstance];

    if (![ff databaseExists])
    {
        NSString *path = [[NSBundle mainBundle] pathForResource:@"FakeData" ofType:@"plist"];
        NSArray *data = [NSArray arrayWithContentsOfFile: path];
        NSManagedObjectContext *managedObjectContext = [ff managedObjectContext];
        NSError *error = nil;

        for (NSDictionary *row in data)
        {
            Person *person = (Person *)[NSEntityDescription insertNewObjectForEntityForName:@"Person" inManagedObjectContext:managedObjectContext];
            Photo *photo = (Photo *)[NSEntityDescription insertNewObjectForEntityForName:@"Photo" inManagedObjectContext:managedObjectContext];

            photo.name = [row objectForKey:@"name"];
            photo.url = [row objectForKey:@"path"];
            person.name = [row objectForKey:@"user"];

            [person addPhotosObject:photo];
        }

        [managedObjectContext save:&error];
    }
  • 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-23T11:26:33+00:00Added an answer on May 23, 2026 at 11:26 am

    In your code you would check whether error is nil after you have sent the save: message to the managedObjectContext, or alternatively, whether the return value of that expression is YES. If that’s the case, it means there were no errors while saving your changes in the context.

    If you just want to check by hand (e.g. after already running the code previously), you can of course simply open the SQLite database in some browser and check the data is there. SQLite Manager extension for Firefox is a nice tool for that.

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

Sidebar

Related Questions

Watching few examples that use repository pattern like StoreFront I couldn't figure out where
I want to prevent my app doing certain things when the user is watching
I've been watching the Stanford CS193P lectures and I've been working on the assignment
Sometimes, while I'm watching my program run, I'll want to set a breakpoint with
I'm running multiple idempotent tasks to gather one batch of data. I found out
I want to sync my Core Data shoebox app with iCloud. An example project
Watching some videos they talk about endpoints and im not sure what the differences
After watching Sussman's lecture http://www.infoq.com/presentations/We-Really-Dont-Know-How-To-Compute , I am inspired to give core.logic and core.match
After watching the webinar, skimming over the BuckyBook PDF, and following the Eclipse RCP
After watching a YouTube video on the Diffie-Hellman Key Exchange , I wanted to

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.