views:

705

answers:

2

Just wondering what code I would need to do this?

+1  A: 

Core Data does not exist on the iPhone, so you'll need to use something else for the iPhone portion at least. In fact, if you want to share a significant amount of code between the iPhone and Mac apps, you'll probably want to avoid Core Data altogether.

Boaz Stuller
+1  A: 

There's no CoreData for the iPhone (yet), so there's no way to use the same code in your iPhone and Mac app. You could write your own wrapper around sqlite that will run on both. The Omni group has an open source version of this (under a modified MIT license) which would probably be a good starting point.

In addition, there's no built in way to sync data, so you'll have to come up with a way to do that as well. Many apps run a server on the phone/mac and sync via that server. It generally requires that your phone is connected to the same wifi network as the mac.

wbyoung
Core Data is in iPhone OS 3.0.
Matthew Schinckel