2011-10-20 83 views
0

可能重複:
What is the iOS 5.0 user agent string?user - agent ios 5.0?

我想移動頁面的Web視圖

所以,我能夠識別設備(= iphone)

3GS IOST 5.0 。什麼用戶代理?

NSMutableURLRequest *請求=(NSMutableURLRequest *)REQ;

if ([request respondsToSelector:@selector(setValue:forHTTPHeaderField:)]) 
{ 

[請求的setValue:[的NSString stringWithFormat:@「%@的Mozilla/5.0
(iPhone; CPU iPhone OS 5_0,例如Mac OS X)爲AppleWebKit/534.46(KHTML,例如Gecko)版本/ 5.1移動/ 9A334野生/ 7534.48.3
」,[請求valueForHTTPHeaderField:@ 「用戶代理」]] forHTTPHeaderField:@ 「User_Agent類」]; } return YES; }

大膽區域。我想要一個正確的用戶代理。

回答

0

的iOS 5.0

iPhone:

Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3 

ipad公司:

Mozilla/5.0 (iPad; CPU OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3 

的iOS 5.1

iPhone:

Mozilla/5.0 (iPhone; CPU iPhone OS 5_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B176 Safari/7534.48.3 

的iPad:

Mozilla/5.0 (iPad; CPU OS 5_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B176 Safari/7534.48.3 
相關問題