views:

562

answers:

1

Hi,

I have a query regarding BackUp of third party application data on PC.

I am developing an application which can store photos, text, recordings. The user can add number of photos or recordings.

So at the runtime, size of application storage will go on increasing. User will never want to loose his data but storage is limited. Hence taking backup of data on his computer and then deleting from iPhone seems essential.

So what is the standard way of taking backup of third party application data?

Is there any way by which we can save the data on MAC as well as Windows using iTunes?

Is there any limit on amount of storage a third party application can take?

Please help in this regard. Thanks in advance.

+1  A: 

iTunes will perform a complete backup of the iPhone when it is plugged in for sync, which will contain all the application-specific data files. However, the only way to restore this is to restore the entire system image, so that is only an emergency backup, not what you need.

Third parties have typically provided their own backup and synchronisation strategies. There are two broad approaches:

  • in conjunction with a companion desktop version of the same application (eg. OmniFocus, Things, Four Track)
  • using a web service (eg. Darkslide for Flickr)

The web services are typically accessed via an AJAX API (or equivalent), but will obviously take longer for backups of large files. The desktop sync products provide their own (eg. OmniFocus uses a WebDAV server) and use an internal sync engine to keep things up to date, and can sync using the WiFi connection.

So either way, you are most likely going to have to write your own server to handle your own backups, and deal appropriately with the file types and metadata. I don't know of a third-party solution to this, but if one exists, it would be very generic, and may not suit your particular needs (eg. for file formats, etc).

So what is the standard way of taking backup of third party application data?

Write your own sync server and connect via WiFi. Start by looking at WebDAV, as you can build something on top fairly easily.

Is there any way by which we can save the data on MAC as well as Windows using iTunes?

iTunes will only do a full system backup. Your best bet is to write your sync server to be portable.

Is there any limit on amount of storage a third party application can take?

AFAIK there is no per-application storage limit on the iPhone. If you provide your own solution, you could do something like archive anything older than 30 days onto the Mac/PC, so you are only keeping recent files. Then allow them to choose "favourites" and those will be kept on the iPhone regardless of age.

gavinb
Thanks gavinb for your quick reply.I want the above mentioned archive functionality but writing own sync server looks bigger than my application.What Do all developers do while developing applications whose data goes on increasing?I thought of giving option of mail with photos as attachments but again size of mail will be a restriction.Any suggestions?
Roger_iPhone
For image storage, why not use the built-in photo album, storing images using UIImageWriteToSavedPhotosAlbum()? This takes advantage of a central repository of these images, for use with other applications, and can be synced to iPhoto. As far as custom sync support, you might want to look at Marcus Zarra's ZSync: http://www.zarrastudios.com/ZSync/ZSync.html
Brad Larson
@Amitkumar You may find that a WebDAV server does most of what you need, and there should be a client readily available for the iPhone. Also, the ZSync project that Brad mentions looks very promising. For ever-increasing data, if you only keep the most recent 30 days (or however many makes sense) worth of data on the device, that will keep storage requirements manageable. Emailing photos is quite inefficient.
gavinb
@Amitkumar Have a look at the Apache WebDAV documentation http://httpd.apache.org/docs/2.0/mod/mod_dav.html which is pretty easy to set up. And DAV-E is a very promising looking client for the iPhone: http://greenbytes.de/dav-e.html
gavinb