iOS 8 Extensions: Sharing Code with an Embedded Framework

Note: Due to the NDA, this tutorial won’t include any screenshots from Xcode 6. When iOS 8 is released, I will update the tutorial with screenshots.

Extensions were one of the more dramatic new things introduced at WWDC 2014. They allow all kinds of convenient ways to extend the power of your app beyond the app itself.

This tutorial will walk you through making a today extension for iOS 8 (commonly called a widget). Widgets display in notification center, and allow people to quickly access to bits of information or perform simple actions without having to launch your app.

Although this tutorial specifically focuses on today extensions, much of what we will cover  applies to other extensions too, including sharing code & data.

Before you begin, download the source code to super simple sample app Word of the Day here. Word of the Day as you would expect, displays the word of the day from Wordsmith.org. It wouldn’t get many downloads in the App Store, but it does the job.

This is a finished project, with a widget (today extension), an embedded framework we are using to share code, and data sharing with a shared container.

Continue reading