tags:

views:

131

answers:

1

I am unit testing an application on the iPhone, and I'm trying to develop a built-in method to record a specific action that users make to interact with my application. I would like for this data to be transported back to me in some way. Originally, I had a method of collecting this information, but I had to be around. This was with nc.

Now, I am thinking of formatting the data and sending it as an email.

This is purely a design question, but does anyone have another suggestion for collecting large quantities of data? I've toyed with the idea of dumping the data into the iPhone filesystem, and asking my testers to politely retrieve them via SSH, but this requires all test devices to be jailbroken, and is not a viable solution.

The best that I've come up with is to just format this data, shove it into the body of an email, and send it to a hard-coded email (mine).

Is it possible to format this data into a file, and send as an attachment? This would also be a much more convenient solution, as it's confined to what I've thought up.

For clarity sake, the flow of this looks something like this:

  1. Distribute Beta
  2. Users interact with Beta
  3. For every use that results in a bug, dump the data into a format that my industry standard desktop app can read
  4. Attempt to correct for this behavior on the iPhone by simulating the algorithm with the collected data

So it's not purely for usage analysis, it's purely for debugging.

+1  A: 

It's very inconvenient to send email this way from the device in 2.2. You can only use mailto: URLs, and no attachments. Worse, the user needs to have mail setup correctly. Writing your own SMTP client isn't much better, especially given iPhone's notoriously bad DNS library.

A better solution is to post the information to a web service. Very easy, very fast, runs in the background. As a matter of good taste, you must of course get user permission to do this, but we've had good luck with it.

If you're trying to track user behavior through your app, we've had very good luck with Google Analytics directly from the device. We had to build our own system for doing it, but it isn't that difficult.

Rob Napier
Hey, thanks for the advice. I don't think I was quite clear. The purpose for collecting information in my instance is that I wanted a set of data for UUT testing. I can examine this dump of a signal that the user generates by interacting with the device. Then, if my app fails to process it correctly, I want to be able to know this, take a look at it to see if it's possible to process it correctly, and then make corrections and use that data to make sure it works.
Sam
Sure, for that the web server still generally is the best bet. I've gone both directions: a web server that the iPhone app connects to, and a small web server on the iPhone (using cocoahttpserver) that you can browse from the desktop. The latter is nice because you can copy off any files you can write. For one product we even pulled in a zip library and automatically zipped up all the files for you when you connect.
Rob Napier