From the course: iOS and watchOS App Development: Notifications

Unlock the full course today

Join today to access over 22,700 courses taught by industry experts or purchase this course individually.

Watch push notifications

Watch push notifications

From the course: iOS and watchOS App Development: Notifications

Start my 1-month free trial

Watch push notifications

- [Instructor] The last thing I want to show you about the Apple Watch extension is how it handles push notifications, which is a very different thing than iOS. At the top, you'll see under the Watch Schemes a special notification scheme. Go ahead and find that scheme, and I'm going to set this to iPhone XS Max, an Apple Watch Series 4 - 44mm, and go ahead and run that right now. What this will do, will simulate the push notification. The project will load, and shortly after the project loads on the phone, you'll see a notification show up on your watch. Go ahead and stop the app, and you'll find down here, in the WatchKit extension, PushNotificationPayload.apns. They've created an APNs file for you. You can put whatever you want in here, to be your push payload for testing. And there's a whole, big, long description down here for you. But pretty much the same thing as we've already talked about. You start with the aps, you put an alert with a body, a title, and a subtitle…

Contents