Chapter 13. Extending iOS Apps
In this chapter, we’ll add app extensions to the Notes app. In particular, we’ll be adding a Spotlight indexing extension, which will ensure that all documents are kept up-to-date; and a Today screen extension, which will add an entry to the user’s Notification Center that gives quick access to the user’s documents.
An app extension is a program that’s embedded in an app and used by the system for some auxiliary role. There are many different app extension types available:
-
Action extensions appear as entries in a
UIActivityController
, allowing your app to receive and process content. Dropbox’s “Save to Dropbox” feature is an action extension. -
Audio unit extensions allow an app to provide an audio unit, which is a plug-in that audio-processing apps can use to generate, modify, or receive audio.
-
Content blocker extensions allow an app to provide a list of URLs and URL patterns that Safari will refuse to load resources from. Content blockers are primarily designed to let apps provide ad-blocking functionality to Safari by filtering out content from specific sites, such as ads hosted on ad-providing servers.
-
Custom keyboard extensions allow your app to provide an entirely customized keyboard for the user to use. A famous example is the gesture-driven keyboard Swype.
-
Document providers allow other applications to access files stored in your app’s sandbox. For example, the Git version control app Working Copy allows other applications to access ...
Get Learning Swift now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.