4. Overview
Existing API Overview
• Different callbacks for local and remote notifications
Limited control after notifications are scheduled
• Different support across multiple platforms
• Depreciated in iOS 10
5. User Notifications Framework
• Familiar API
• Expanded content
• Same code path for local and remote notification handling S
• Better notification management
• In-app presentation option
• Schedule and handle notifications in extensions
6. User Notifications Framework
Registration
User Authorization Options
• Badging
• Sound Alerts
• Banners
UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .badge, .sound]) { (granted, error) in
// Code for handling goes here
}
Needed for both local and remote notifications
11. Trigger
Calendar
Example
let dateComponents = DateComponents()
// Configure dateComponents
UNCalendarNotificationTrigger(dateMatching: dateComponents,
repeats: false)
• “2:00pm tomorrow for meeting”
• “Repeat every Weekdays at 6:00am for gym”
12. Trigger
Calendar
Example
let region = CLRegion()
// Configure region
UNLocationNotificationTrigger(region: region,
repeats: false)
• “When leaving home”
• “When arriving in proximity of shopping store”
17. Service Extension
Basic
• Non UI iOS Extension
• Augment or Replace of content of
Remote Notifications
• End-to-end encryption
• Short execution time
• Add attachments
20. Media Attachments
Basic
• Local and remote notifications
• Support image, audio, video, gif
• Download in the service extension
• Limited processing time and size