Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Section A.4. Initiating Phone Calls

A.4. Initiating Phone Calls

As was demonstrated in the last section, the openURL method calls Safari to launch web site URLs. What's actually going on is this: each protocol is associated with a specific handler application. As was the case with our last demonstration, URLs beginning with http:// and https:// are associated with Safari and cause it to be opened whenever openURL is called using those protocol prefixes. Just as openURL can be used to open web sites in Safari, it can also be used to place phone calls. This is done by using the protocol prefix of tel://:

NSURL *url = [ [ NSURL alloc ]
    initWithString: @"tel://212-555-1234" ];
[ self openURL: url ];


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial