Reputation: 13062
I have to perform user-agent (UA) to application mapping for a few iOS related UAs. Most of the application user-agents have the name of the application in them, like for Facebook App it seems to be
Facebook/3440 CFNetwork/485.13.9 Darwin/11.0.0
But I see a lot of generic UAs. I cannot find the applications related to these. Can someone tell me what generates these. These are, for example:
Apple-iPhone3C1/812.1
Apple-iPhone2C1/812.1
Apple-iPhone3C1/807.4
Apple-iPhone3C1/810.2 etc.
Also, is there any open app or resource that maps UAs to Apps for iOS?
Upvotes: 1
Views: 4089
Reputation: 63667
Those generic UAs don't belong to an app. It's the id of the hardware and the WebKit version.
This part is the hardware model:
iPhone3C3 = 4 (Verizon)
iPhone3C1 = 4
iPhone2C1 = 3Gs
iPhone1C2 = 3G
iPad2C3 = iPad 2 (Verizon)
iPad2C2 = iPad 2 (AT&T)
iPad2C1 = iPad 2 (WiFi)
iPad1C1 = iPad
iPod2C1 = iPod Touch 2
iPod3C1 = iPod Touch 3
iPod4C1 = iPod Touch 4
This code
UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectZero];
NSString *ua = [webView stringByEvaluatingJavaScriptFromString:@"navigator.userAgent"];
gives you this string:
Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_5 like Mac OS X; en-us)
AppleWebKit/533.17.9 (KHTML, like Gecko) Mobile/8L1
which contains a WebKit version (533.17.9 in the example).
Upvotes: 3