When Apple added the Notification Center to iOS in iOS 6, they also added some stock widgets to a section called the Today View. These widgets had limited functionality and, as developers, we had no ability to add our own widgets to this view. Users were stuck with a weather widget, one for stocks, one for the calendar, and a few more.
It wasn't until iOS 8 that Apple decided that developers should be able to create extensions for the Notification Center in the form of widgets. Together with that addition, Apple has added the ability for developers to create several extensions that integrate apps with iOS. This chapter will focus mainly on creating a Today Extension: A widget.
You'll learn what the life cycle of an extension looks like and how extensions integrate with the OS and your app. The basis for this extension will be a small, simple app that has content that varies throughout the day.
We will cover the following topics in this chapter:
- Understanding the anatomy of a Today Extension
- Adding a Today Extension to your app
Even though we only have two bullet points to cover, there will be plenty of information for you to take in. Let's dive right in.