2

I'm coding an app with core data. I need to sync the database between two iphones running the same app maybe via bonjour... Can anyone help?

Thankyou!

vikingosegundo
  • 52,040
  • 14
  • 137
  • 178
a.periz
  • 21
  • 1

1 Answers1

0

I would suggest using cocoahttpserver for the basic network communication. Now you can either

  • copy your sqlite file if used in CoreData

or

  • use some exchange-format (xml, json) on top of the server communication.

I myself would consider idea one being quite bad in most situations, also it might fit for your use-case.

With idea two you will have more work but more control about the data representation on each phone.

Actually we are using idea two in my company. But I can't post any code here.

vikingosegundo
  • 52,040
  • 14
  • 137
  • 178