Reputation: 2270
I am trying to load a web page in UIWebview. The URL request contains following user agent:
"User-Agent" = "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3 like Mac OS X) AppleWebKit/603.1.23 (KHTML, like Gecko) Version/10.0 Mobile/14E5239e Safari/602";
When I try lo load the same with safari browser the user agent is:
"User-Agent" = "Mozilla/5.0 (iPhone; CPU iPhone OS 9_3_5 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13G36 Safari/601.1";
The os version is 10_3 instead of 9_3_5.
How to resolve this issue. Any suggestions?
Upvotes: 0
Views: 262
Reputation: 26
Did you possibly set a custom UserAgent? If so try to reset it like so:
NSMutableDictionary *mDict = [[NSUserDefaults standardUserDefaults] volatileDomainForName:NSRegistrationDomain].mutableCopy;
[mDict removeObjectForKey:@"UserAgent"];
[[NSUserDefaults standardUserDefaults] setVolatileDomain:mDict forName:NSRegistrationDomain];
Upvotes: 0