O'Reilly logo

Appcelerator Titanium Smartphone App Development Cookbook - Second Edition by Jason Kneen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Opening URLs in Chrome for iOS

For iOS users, the default browser is still Safari. iOS 8 added some new features called extensions, which allowed developers to be able to add commands to Open with menus so that their apps could handle certain types of data. But the default for clicking on a link will always be Safari.

In your own apps, however, you can override this by opening links with a specific URL scheme that relates to Chrome for iOS. When you do this, the link that you specify will be opened in Chrome if it's installed on the user's device.

How to do it

  1. Go back to the app.js file in Studio and add some more code. First, we need to add a new label, so we add this under our label3 definition:
    var label4 = Ti.UI.createLabel({ left: 30, top: 250, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required