Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

tom2010

macrumors newbie
Original poster
May 31, 2010
1
0
Today, there are iPad, iPhone (of different generations), iPod (Touch of different generations), if I have an app that can run on all of three that sets up NSURLConnection to a remote service. How can I let the service side know from exactly which type of device that the request was from?
 
Haven't tested this in a bit, but I believe the user-agent of the NSURLConnection might include the device type. If not you can always set that. Otherwise I might try to append a parameter onto the URL of the device name.

Code:
http://www.example.com?device=iPhone

Code:
[[UIDevice currentDevice] name]
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.