Book Image

Application Development with Swift

By : Hossam Ghareeb
Book Image

Application Development with Swift

By: Hossam Ghareeb

Overview of this book

Table of Contents (14 chapters)

Demo


Working with the app extensions is not a big deal, and Xcode templates help you so much to get started with your extension. In this section, we will build a very simple demo on one of the preceding extensions: the Today extension. We talked about the Today widget and saw how it's very helpful to provide your users with appropriately updated data in an easier way from the Today view in the notification center.

So, in this demo we are going to make a widget that displays weather information. We will display the weather for Venice. As you know, it's just a demo, but in the real world you can use location services to display the weather data of the user's current city. Also, maybe you can display a list of weather data for multiple cities that the user sets as his favorites in your containing app.

  1. Okay, now it's playtime. Create a new Xcode project with any template and choose Swift as the language. Then navigate to File | New | Target. Take a look at the following screenshot:

  2. Then, under...