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

Setting up your own apps to use URL schemes

Now that we've played with existing apps that accept URL commands, let's add some of this capability to our own application.

How to do it...

There are two stages in enabling URL schemes: establishing the scheme name and configuring the app, and then writing the code to accept the URL commands.

Let's do the first step and configure our app to accept a URL Scheme. We'll use the same project that we've been working with, so add the following code to the tiapp.xml file, replacing any existing ios tag:

<ios> <plist> <dict> <key>UISupportedInterfaceOrientations~iphone</key> <array> <string>UIInterfaceOrientationPortrait</string> </array> <key>UISupportedInterfaceOrientations~ipad</key> <array> <string>UIInterfaceOrientationPortrait</string> ...

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