简体   繁体   English

如何更改iPhone上的默认浏览器?

[英]how to change default browser on iphone?

I am new to iOS and I want to know that, How to change the default browser as Google chrome on iPhone Simulator? 我是iOS的新手,我想知道如何在iPhone Simulator上将默认浏览器更改为Google chrome?

Thank you in advance. 先感谢您。

As xlc has mentioned the Simulator doesn't allow you to install third party applications. 正如xlc所提到的,模拟器不允许您安装第三方应用程序。 It's designed to let you test your code and how it interacts with iOS. 它旨在让您测试代码及其与iOS的交互方式。

You cannot change default iOS default browser unless and until your device is jailbroken. 您不能更改默认的iOS默认浏览器,除非并且直到您的设备越狱为止。

but you can open links in google chrome from your app using : 但是您可以使用以下方法从您的应用程序中打开Goog​​le Chrome中的链接:

[[UIApplication sharedApplication] canOpenURL:
    [NSURL URLWithString:@"googlechrome://http://www.nameofwebsitehere.com"]];

Note : this will not work on simulator and you should add a check to see if Google chrome is installed on device. 注意:这在模拟器上不起作用,您应该添加检查以查看设备上是否安装了Google chrome。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM