views:

135

answers:

1

I wrote a few iPhone apps using Core Data for persistent storage. Everything is working great but I would like to add the ability for users to back up their data to a PC (via WiFi to a PC app) or to a web server.

This is new to me and I can't seem to figure out where to begin researching the problem. I don't want to overcomplicate the issue if there is an easy way to implement this.

Is anyone familiar enough with what I am looking to do to point me in the right direction or give me a high level overview of what I should be considering?

The data is all text and would be perfectly stored in .csv files if that matters.

+1  A: 

Unfortunately, I don't think there's a good all-purpose solution under the current SDK. Here are some ideas:

  • If you only want backup, you could just back up the whole sqlite file to the server or over wifi, but you then can't really use it with anything other than Core Data (and you might even run into trouble with iPhone-Mac compatibility, e.g. between 32-bit and 64-bit types).
  • A very robust solution would be to implement cloud storage with a REST API and sync the iPhone and desktop app to the server (this is what the Evernote app does, for instance), but that is obviously much more work.
  • You could also manually convert your data to a .csv and send that to the server or desktop, but parsing it could be problematic (and you'd have to worry about the data getting corrupted). If you did want to go that route, here is a tutorial.
eman
Thanks. I'm glad to see that I wasn't missing something obvious. I'll stick with my email export for now unless something comes along to convince me that it is worth the effort.
Eric