« Core Data, Part 4: Inserts, Updates & Deletes | Main | Core Data, Part 6: There's More than One Way to Do It »

September 18, 2009

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a010535e1becf970c0120a58118ae970b

Listed below are links to weblogs that reference Core Data, Part 5: Prefilling Data:

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

David Pedigo

Great series on Core Data! These have helped out on a project that I've been working on.

May I request that you do a post on using NSFetchedResultsController?

Nick

Wonderful series! Thanks so much for compiling it -- it makes a great addition to iPhone in Action, which I also own and love.

Another vote for an NSFetchedResultsController example. Would also be great to learn more about Core Data Migration; I understand that changing the model in a point release renders previous versions of an app's data unreadable by default.

Would be happy to pay for tutorials on both of these. Your writing is so clear and easy to follow. Thanks again!

Shannon Appelcline

Thank you for the kind words. I do plan to write something on NSFetchedResultsController based on your requests. Probably next week, if my programming schedule allows.

jerry

Thanks for the great series on this under-documented subject.
I would like to know more about updating the pre-filled data in a point release. For instance, say you have an app for bird-watchers which stores details of bird species in a core data database. How would you add more birds in the next release? Also, if you have a 'favourite birds' part of the interface, does that require a separate persistent store?

Rick

This is great tutorial. I am pretty new to app development and this series was written like I wanted to learn. It has great analogies to mitigate the apple tech speak. I am working on a database of cities and states and was able to completely finish the database from prefilling to random access with this tutorial. Thanks again.

Simon

This has been a great series.

I've been able to follow everything and have it work in the simulator.

However, in having it work on the phone it seems I'm doing something wrong on the last step.

"Copy your data from the Simulator's documents directory into your actual project's bundle."

Could you elaborate on exactly which files need to be moved?

Jason

Just wondering if anyone knows why the saveAction has been removed from the CoreData template in the latest SDK 3.1 and SDK 3.1.2?

Jeff

I'm wondering the same thing, Jason. There is no saveAction: method in my files either. I tried adding one but it's giving me the "may not respond" warning. Anyone know anything about this?

mohrt

You can add saveAction back in to the app delegate, then change the appWillTerminate method to call that. It probably says "may not respond" because you did not declare saveAction: in the app delegate header (.h) file.

DrStrangecraft

Your Core Data posts have helped me tremendously.
I've gotten much more out of them than a Core Data book I bought.
Thank you.

DrStrangecraft

(part II of comment)
I've now successfully pre-filled data using exactly the technique you describe. That was cool, and very useful.

I have a related question. The data I've pre-filled requires one of the entities to be pre-selected as the "default". Typically that would mean using an object ID string in an NSUserDefault, and then providing that ID string in a dictionary to be registered upon the first launch of the app. This method works, but something in me gets a little worried about the object ID string and the entity getting out of sync somehow.

A different method would be to create a new "isDefault" attribute in the entity itself, and search through them upon launch.

I don't suppose either of these is superior, but I wonder if you have run into a similar situation, and if so how you handled it.

Thanks.

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment