device type

Discussion in 'iOS Programming' started by tom2010, May 31, 2010.

  1. tom2010 macrumors newbie

    Joined:
    May 31, 2010
    #1
    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?
     
  2. simon-says macrumors regular

    Joined:
    May 24, 2005
    Location:
    Shreveport, LA
    #2
    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]
     

Share This Page