Reputation: 269
I have developed an iPhone app using Monotouch and am about to do some user testing and run a trial once every 90 minutes on the same task with a different user. Therefore I need to 'zero' the app to avoid biases from the previous user's work. Since the data is stored in SQLite, is there a way to programmatically backup the iPhone data within Monotouch, either to a remote server or to a file persistent on the device?
Upvotes: 0
Views: 309
Reputation: 31097
For backup File.Copy(source, destination)
is sufficient. As for where, I'd say in the same location where your db is currently located. (I wouldn't recommend this though.) You will need to ship with the app a copy of the empty database that you copy over when a new user starts using the app. You need to figure out what's the identifier of each user (username, hash of their email address, etc..)
If you want to upload the database, then you can do it via a HttpWebRequest
, or ftp/sftp (if you have libraries handy).
My opinion is that you need to:
Upvotes: 2