views:

82

answers:

5

I've been asked to make a small quiz/survey application for a conference. The application will be loaded onto 30 to 50 iPhones, which will be distributed throughout the venue for the duration of the conference. The application will log all of the data collected by the quiz. I need to figure out a simple and fail-safe way to collect all of this data at the end of the conference.

Does anybody have any ideas about how I should:

  • log the data on the device
  • collect the data logs from all of the devices
  • introduce some kind of redundancy to prevent data loss if the app crashes etc.

Any suggestions would be greatly appreciated.

+1  A: 

The iPhone SDK comes complete with SQLite which would be a good way to store the data on the device. (Another option would be to use Core Data, so you'll have to pick between the two.) While I am not familiar with SQLite there should be a way to get a database dump or backup of some kind that you can retain for redundancy's sake. As for collecting the information off of the devices at the end of the conference, I would take a backup/dump of the data and transfer it to a computer using one of the available network APIs in the iPhone OS.

fbrereto
+2  A: 

If internet access is going to be available during the conference I would suggest store everything online therefore no data would get lost if your app crashes.

Josua Pedersen
iPhone apps can easily save to persistent storage on the device. As long as the app doesn't wipe the log on startup local storage should be plenty, and potentially much faster - especially with how overloaded conference hall wifi can get.
ceejayoz
A: 

Don't store data locally, have the iPhone email it when the survey is complete.

Andrew Lewis
+1  A: 

I would go with a mixed web & local storage approach.

1) The users answers would be stored locally on the iphones using the Core Data capabilities.

2) Once the phones are collected at the end of the conference, you will navigate to a password protected "Admin" view that will allow you to "Upload Results" to your web server for aggregation. Once the results are sent to the web server, they can be deleted from the iphones storage.

The storage capabilities exposed with Core Data are very stable and reliable, I would not worry about losing data if the app crashes.

Feel free to comment if you have any questions.

JWD
This seems the best plan to me, I was going to ask if the devices were collected at the end or not though.
Kendall Helmstetter Gelner
I just assumed they were collected at the end, I guess I can't make that assumption, haha. If they are just giving out iPhones, let me know where this conference is!
JWD
+1  A: 

There are several ways you could do this but it will really depend on time to develop and the availability of internet access.

If time is not on your side and need to get it done quick then I would highly recommend storing it locally in a plist file of the applications document directory. Then when when completed, you could simply add an admin section to your application where you can extract the plist file of the answers and email it. This is pretty straight forward and really easy to get the data.

If you have more time then I would recommend building a web server app that could accept the data and store the results on the server. This is bit more complicated but there are several examples on how to create a web server to pass information between your iPhone and the web server.

The last approach would be hybrid of both. Store all answers in a plist file or with CoreData, and at the end, you could have a feature that communicates to your web server and sends all the results to the server.

Niels Hansen
Smendrick