Chapter 11

Inter-App Communication


  • Registering custom URL schemes
  • Changing behavior based on the presence of other installed apps
  • Leveraging enterprise single sign-on
  • Detecting and reusing data from previous installations


The code downloads for this chapter are found at on the Download Code tab. The code is in the Chapter 11 download and individually named according to the names throughout the chapter.

After mastering the traditional forms of network communication, it’s natural to look at other apps on a device and wonder how you can interact with them as well. The sandboxed operating model of iOS applications limits the capabilities of the inter-app communication techniques described in this chapter, but with some creative thinking, you can accomplish more than you might think. The most direct approach is to implement one or more URL schemes in your app. URL schemes enable an app to sense the presence of other apps and perform specific actions in them. Alternatively, a more indirect approach uses a shared keychain as a common key-value store for a group of related apps by the same developer. This chapter provides concrete examples of both of these approaches. Many of these examples are meant for Facebook and Twitter, but also include a generic implementation ready ...

Get Professional iOS Network Programming: Connecting the Enterprise to the iPhone and iPad now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.