Change Phonegap User Agent

后端 未结 6 2008
独厮守ぢ
独厮守ぢ 2020-12-08 17:30

My Phonegap application is allowed to browse to some external sites that also use the Phonegap API. Currently I am conditionally including the Phonegap javascript based on

6条回答
  •  隐瞒了意图╮
    2020-12-08 18:17

    CB-2520 was resolved, which proposed allowing the user-agent string to be modified. You can achieve this now by setting the baseUserAgent property of the MainViewController. For a simple test, you can add the following to the didFinishLaunchingWithOptions method of the AppDelegate.m, after the MainViewController is initialized:

    self.viewController.baseUserAgent = @"My Custom User Agent";

提交回复
热议问题