views:

1475

answers:

2

Hello there! I'm building an iPhone app, that basically just displays information from an rss feed, and drags in some extra info from a related web site. I'm considering to put in some reporting code, eg the code provided by PinchMedia. I do have some issues with that, because I'll be monitoring users without consent. So, I was wondering if it was possible to just take a look at the requests that are received by the rss provider.

In my code, I approach the feed as follows:

NSString * path = @"http://feeds.feedburner.com/whatever";
[self parseXMLFileAtURL:path];

Does the iPhone send any User Agent information to the server when opening that URL? If so, can I alter it in such a way, that it would be easy to distinguish a call from my app from regular rss clients?

Thank you for your insights!

+1  A: 

It sends the name of the app with the version number. It looks very different than the string browsers send so it's easy to distinguish.

nevan
That sounds good. Do you have a link to any documentation on this?
Sorry, I don't. I just got it by making a request to my server and looking at the logs.
nevan
+1  A: 

For your reference, here's the User Agent string supplied by an iPhone running the 3.0 version of the OS:

Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A341 Safari/528.16

As Nevan says, that should allow you to distinguish iPhone requests from other requests.