How to sync Core-Data app between Mac and iPhone?

Just wondering what code would I need to do?

+1


source to share


2 answers


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



Also, there is no built-in way to sync data, so you'll have to figure out a way to do it. Many apps run a server on phone / Mac and sync through that server. It usually requires your phone to be connected to the same Wi-Fi network as the Mac.

+1


source


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



+1


source







All Articles