ios 10 rich push notifications

39
Rich notifications with iOS 10 28.03.2016 by Piotr Dębosz

Upload: infullmobile

Post on 11-Apr-2017

44 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: iOS 10 Rich Push Notifications

Rich notifications with iOS 10

28.03.2016by Piotr Dębosz

Page 2: iOS 10 Rich Push Notifications

What’s new in iOS 10 notifications?• UserNotifications framework• Triggers• Notification management• Media attachments• Custom user interface

Page 3: iOS 10 Rich Push Notifications

Remote notifications• Apple Push Notification Service• Obtaining token• Sending push notification• Silent notifications

Page 4: iOS 10 Rich Push Notifications

Local notifications• Scheduled by app installed on the device

Page 5: iOS 10 Rich Push Notifications

Registration• Request user authorisation permission

• Banners• Sound alerts• Badges

• Needed for local and remote notifications

Page 6: iOS 10 Rich Push Notifications

Notification settings• Configurable in Settings per app• Access to user-defined settings

Page 7: iOS 10 Rich Push Notifications

Token registration• Remote notifications• Using existing API

• Need internet connection to talk to APNs

Page 8: iOS 10 Rich Push Notifications

Content• Title• Subtitle• Body• Badge

Page 9: iOS 10 Rich Push Notifications

Triggers

Push

Time interval

Calendar

Location

Page 10: iOS 10 Rich Push Notifications

Triggers

Push

Page 11: iOS 10 Rich Push Notifications

Triggers

Time interval

Page 12: iOS 10 Rich Push Notifications

Triggers

Calendar

Page 13: iOS 10 Rich Push Notifications

Triggers

Location

Page 14: iOS 10 Rich Push Notifications

Schedule• Local notifications

Page 15: iOS 10 Rich Push Notifications

Schedule• Remote notifications

Page 16: iOS 10 Rich Push Notifications

Handling notifications• App is in foreground• In-app presentation

Page 17: iOS 10 Rich Push Notifications

Notifications Management• Access

• Pending notifications• Delivered notifications

• Remove notifications• Update notifications

• Request identifier• Local - set on notification request• Remote - set as HTTP/2 request header field: apns-collapse-id

Page 18: iOS 10 Rich Push Notifications

Notifications Management

Page 19: iOS 10 Rich Push Notifications

Notification Actions• Introduced in iOS 8• Default action• Buttons with custom titles• Text input• Dismiss action

Page 20: iOS 10 Rich Push Notifications

Notification Actions

Page 21: iOS 10 Rich Push Notifications

Notification Actions

Page 22: iOS 10 Rich Push Notifications

Response handling

Page 23: iOS 10 Rich Push Notifications

Service extension• Non UI extension• Launched on demand• Use it to modify notification content• Short execution time• Use for end-to-end encryption• Download attachments

Page 24: iOS 10 Rich Push Notifications

Service extension• Add new target

Page 25: iOS 10 Rich Push Notifications

Service extension

Page 26: iOS 10 Rich Push Notifications

Service extension

Page 27: iOS 10 Rich Push Notifications

Media attachments• You can add different media types

• Photo (including animating GIFs)• Video• Audio

Page 28: iOS 10 Rich Push Notifications

Media attachments

Page 29: iOS 10 Rich Push Notifications

Custom user interface• Notification content extension• UI extension with custom view• No interaction• Respond to notification actions

Page 30: iOS 10 Rich Push Notifications

Custom user interface

Page 31: iOS 10 Rich Push Notifications

Custom user interface

Page 32: iOS 10 Rich Push Notifications

Custom user interface

Page 33: iOS 10 Rich Push Notifications

Custom user interface

Page 34: iOS 10 Rich Push Notifications

Custom user interface • Action handling• Default action handling• Intercepting action response• Response delivered to extension• Delay dismissal

Page 35: iOS 10 Rich Push Notifications

Custom user interface

Page 36: iOS 10 Rich Push Notifications

Demo

Page 37: iOS 10 Rich Push Notifications

More informationshttps://developer.apple.com/reference/usernotifications/

Twitter - d_bosh

Page 38: iOS 10 Rich Push Notifications

Questions?

Page 39: iOS 10 Rich Push Notifications

Thank you.