From the course: iOS and watchOS App Development: Notifications

Project and exercise files overview

From the course: iOS and watchOS App Development: Notifications

Start my 1-month free trial

Project and exercise files overview

- You can try out what I'm doing using the exercise files. To show you the basics of user notification framework and local notifications, we'll be using a single demonstration project that I'm showing here. The project will schedule three different notifications. Two will be in the app, and one will be a push notification. I've already added all the assets and a few methods you'll need for this project to save you time. I also edit the storyboard, and connected all the outlets, and actions, and view controllers for you. Suppose you had an application that timed how you would make a pizza. The app, once you order your pizza, would give you notifications of the steps followed. You press a button on the notification to stop the notification, or to add the next step. Once completed, another set of notifications will give you information about delivery. At first, we'll launch these notifications using the local notifications on the buttons. Then look at a page to manage those notifications. Next, we'll add a push notification. Finally, we'll send those notifications to an Apple Watch. I want to point out one important note, after chapter five we'll be working with push notifications. You will need to use your own unique bundle identifier to produce the required certificates online. If you follow the material from the beginning, you will have no problem. You can now skip to the next video. However, if you skip ahead in the material to after chapter five, and download the code past chapter five, make sure you're following the directions in the beginning of chapter five to change the bundle identifier to a unique one, and get the proper certificates for push notifications. After chapter five, if you download an exercise file, you'll need to generate that certificate yourself to use a push notification and need to make a few more changes. You'll be adding extra targets to the project, and each target needs to reflect that bundle identifier change. For example, in chapter eight, I'm going to have my bundle identifier changed. I'll have each one of the two extensions changed. So I will be changing this to SJL. And I'll be changing this to SJL. You may also want to clear out any old references if you make these changes. The first step is to shut off automatically managed signing, then go ahead up to Product and clean the Build folder. When you get a clean succeeded, go ahead and close the project. In the Finder go to Go, and if you don't see library in there, hit the Option key and select Library. In here you'll find Developer, and in that you'll find Xcode, and in that you'll find Derived Data. Select everything there, move it to Trash, and then in the trash bin, empty everything. Go back and open Xcode, and turn back on automatically managed signing, enable the automatic, and select your team. If you've made certificates and subscribe to chapter five, you're set to go.

Contents