O'Reilly logo

High Performance iOS Apps by Gaurav Vaish

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

Chapter 8. Data Sharing

At times, you will want to share data with another app or get access to shared data from another app installed on the device. For example, a few use cases for sharing data include the following:

  • Integrating with other apps (e.g., giving users the ability to sign into your app using their Facebook login)

  • Releasing a suite of complementary apps such as those offered by Google (i.e., Gmail, Google Calendar, Google Hangouts, and Google+)

  • Moving user data from a unified app to multiple special-purpose apps, detecting their presence and transferring controls when required (e.g., the Facebook app splits into Messenger, Pages, and Groups apps for messaging, pages management, and groups management, respectively)

  • Opening a document in the best available viewer (e.g., opening a PDF file for viewing in a native viewer or a photo for editing in Photoshop Express)

Each technique for sharing data has specific constraints on what can be shared. As an example, using the clipboard may consume a lot of RAM, whereas document sharing uses device storage (both RAM and device storage must be cleared after use). Similarly, using deep linking has overheads of data serialization and parsing.

In this chapter, we discuss various data sharing options from a performance perspective and identify best practices when working with a specific option.

Deep Linking

In the context of the mobile apps, deep linking consists of using a uniform resource identifier (URI) that links to ...

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