Google Chrome Ios



The easiest way to have your iOS app open links in Chrome is to use the OpenInChromeController class. This API is described here along with the URI schemes it supports.

Chrome is Google's browser for Apple devices. Apart from high performance and speed, the software is compatible with numerous Google apps for iOS devices such as Gmail and YouTube. If the app is an iOS app that includes an Apple Watch app, install the iOS app first, then from the App Details page under the Information section, you will see a Watch section. If the Apple Watch app is available and compatible with your watch, you’ll see a button to install it.

Using OpenInChromeController to open links #

Download hulu movies on mac. The OpenInChromeController class provides methods that encapsulate the URI schemes and the scheme replacement process also described in this document. Use this class to check if Chrome is installed or to specify the URL to open.

Methods #

  • isChromeInstalled: returns YES if Chrome is installed
  • openInChrome: opens a given URL in Chrome

For example, use the OpenInChromeController class as follows:

Downloading the class file #

The OpenInChromeController class file is available here. Copy it into your Xcode installation.

Google Chrome Ios 9

The rest of this document describes the underpinnings of this API.

URI schemes #

Google Chrome Ios 10

Chrome for iOS handles the following URI Schemes:

  • googlechrome for http
  • googlechromes for https

To check if Chrome is installed, an app can simply check if either of these URI schemes is available:

Google Chrome IosGoogle

This step is useful in case an app would like to change the UI depending on if Chrome is installed or not. For instance the app could add an option to open URLs in Chrome in a share menu or action sheet.

To actually open a URL in Chrome, the URI scheme provided in the URL must be changed from http or https to the Google Chrome equivalent of googlechrome or googlechromes respectively. The following sample code opens a URL in Chrome:

Google Chrome Ios

If Chrome is installed, the above code converts the URI scheme found in the URL to the Google Chrome equivalent. When Google Chrome opens, the URL passed as a parameter will be opened in a new tab.

Google Chrome Ios

Google Chrome Ios Download

If Chrome is not installed the user can be prompted to download it from the App Store. If the user agrees, the app can open the App Store download page using the following: