ios 10 rich push notifications
TRANSCRIPT
Rich notifications with iOS 10
28.03.2016by Piotr Dębosz
What’s new in iOS 10 notifications?• UserNotifications framework• Triggers• Notification management• Media attachments• Custom user interface
Remote notifications• Apple Push Notification Service• Obtaining token• Sending push notification• Silent notifications
Local notifications• Scheduled by app installed on the device
Registration• Request user authorisation permission
• Banners• Sound alerts• Badges
• Needed for local and remote notifications
Notification settings• Configurable in Settings per app• Access to user-defined settings
Token registration• Remote notifications• Using existing API
• Need internet connection to talk to APNs
Content• Title• Subtitle• Body• Badge
Triggers
Push
Time interval
Calendar
Location
Triggers
Push
Triggers
Time interval
Triggers
Calendar
Triggers
Location
Schedule• Local notifications
Schedule• Remote notifications
Handling notifications• App is in foreground• In-app presentation
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
Notifications Management
Notification Actions• Introduced in iOS 8• Default action• Buttons with custom titles• Text input• Dismiss action
Notification Actions
Notification Actions
Response handling
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
Service extension• Add new target
Service extension
Service extension
Media attachments• You can add different media types
• Photo (including animating GIFs)• Video• Audio
Media attachments
Custom user interface• Notification content extension• UI extension with custom view• No interaction• Respond to notification actions
Custom user interface
Custom user interface
Custom user interface
Custom user interface
Custom user interface • Action handling• Default action handling• Intercepting action response• Response delivered to extension• Delay dismissal
Custom user interface
Demo
More informationshttps://developer.apple.com/reference/usernotifications/
Twitter - d_bosh
Questions?
Thank you.