Tag Archives: Core-Data

Progress with adding iCloud to Chef’s Book.

There are some interesting challenges with incorporating iCloud support, especially into an existing application. One, which I’ve been working through, is that you can no longer copy in a pre-existing store for the purposes of loading data. Such a move … Continue reading

Posted in Chef's Book, Programming | Tagged , , , , , , | 15 Comments

I lied, I love databases too much and core data is a weird one.

Strictly speaking this isn’t a post about core data, honest. It’s ACTUALLY a post about how iPhone applications are deployed and updated. My shipped application contained two data models, my new application also contains two data models. One of the … Continue reading

Posted in Programming | Tagged , , | Comments Off on I lied, I love databases too much and core data is a weird one.

Another Core Data post. Last one for a while I expect.

It seems that when you create a mapping model for core data migrations using XCode (3 or 4) it will not create mapping models for abstract entities you could try here. If you do not create this manually within your … Continue reading

Posted in Programming | Tagged , , | Comments Off on Another Core Data post. Last one for a while I expect.

Using Core Data’s automatic migrations to update data

It’s not brilliantly efficient but it does reuse existing importing code and it does work reliably and well.  If I update the app to include new recipes I only want to include them once.  When the app is first launched … Continue reading

Posted in Chef's Book, Programming | Tagged , , , | 2 Comments

Nearing release, implement shiny things whilst waiting.

As the project nears release my thoughts turn to what will be needed in the near future and how best to solve an intermittent bug that’s present now. The bug was resolving by doing something I should have done ages … Continue reading

Posted in Programming | Tagged , , , , , , | Comments Off on Nearing release, implement shiny things whilst waiting.

One problem with objects being so closely tied to the underlying DB in Core Data.

Why does the following code throw an exception and immediately sig kill on the second iteration at [e nextObject]: for (NSManagedObject *current in categories) { if ([lowercaseName isEqualToString:[current.name lowercaseString]] && category != current ) { // Move all the recipes. … Continue reading

Posted in Programming | Tagged , | Comments Off on One problem with objects being so closely tied to the underlying DB in Core Data.

I should of known it would be the relationships causing trouble.

Converting the JSON messages back into managed objects should be quite simple.  You loop around your dictionary converting stuff back.  A useful shortcut is provided by the managed object function setValuesForKeysWithDictionary.  Given that the dictionary came from a managed object … Continue reading

Posted in Programming | Tagged , , | Comments Off on I should of known it would be the relationships causing trouble.

How to populate CoreData at runtime from a remote source.

To me it seems that documentation on populating apple Core Data based stores is sorely lacking instructions on how to populate the database at runtime from remote sources. Most people electing to populate an SQL Lite database and then just … Continue reading

Posted in Programming | Tagged , , , , | 2 Comments