Launching iPhone Apps With Custom URL Scheme – Part 2

To continue on the types of URL Schemes that are supported by the iPhone (see Part 1); today I will show you how to:

  • Launch YouTube
  • “Deep Link” to content in iTunes

YouTube Links

The YouTube URL scheme is used to launch the YouTube application and play the specified video. If your application links to YouTube content, you can use this scheme to play videos from your application.

NOTE:Unlike some schemes, YouTube URLs do not start with a “youtube” scheme identifier. Instead, they are specified as regular http links but are targeted at the YouTube server. The following examples show the basic strings you would use in Safari and an application to show a YouTube Video. In each example, you would need to replace the VIDEO_IDENTIFIER value with identifier of the video you wanted to display:




iTunes Links

The iTunes URL scheme is used to link to content on the iTunes Music Store. The iTunes URL format is complicated to construct, so you create it using an online tool called iTunes Link Maker. The tool allows you to select a country destination and media type, and then search by song, album, or artist. After you select the item you want to link to, it generates the corresponding URL.

NOTE: For more information about the iTunes Link Maker applications take a look at this FAQ from Apple.