This repo is a rewritten version of Google's OpenInChrome in Swift language. The OpenInChromeController
class is kept identical to the original one. Refer to the original documentation for details.
- Xcode 10 (Swift 4.2)
The OpenInChromeController class file is available here. Copy it into your Xcode installation.
Add this to your application's Info.plist
<key>LSApplicationQueriesSchemes</key>
<array>
<string>googlechrome</string>
<string>googlechromes</string>
<string>googlechrome-x-callback</string>
</array>
Use the OpenInChromeController class as follows:
if OpenInChromeController.shared.isChromeInstalled() {
try OpenInChromeController.shared.openInChrome(URL(string: link)!, callbackURL: nil, createNewTab: false, completionHandler: nil)
}