1

I can redirect based on user agent. But because of some weird problems on this work i am doing, i need to only redirect in-app uiwebviews to a sub folder or domain. Mobile Safari should be out of this redirect. Need help...

4

1 回答 1

0

您可以通过使用“UserAgent”键写入标准用户默认值来更改应用内 Web 视图的用户代理。这是一个例子,

[[NSUserDefaults standardUserDefaults] registerDefaults:@{
     @"UserAgent": @"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/536.26.17 (KHTML, like Gecko) Version/6.0.2 Safari/536.26.17"}];
于 2013-07-20T20:36:06.360 回答