Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
“MAKENOTIFICATIONS
GREATAGAIN!”
@dadederk
NOTIFICATIONS
Get Notification Settings
UNUserNotificationCenter.current().getNotificationSettings { notificationSettings in
print("Notif...
Brexit App
What’s New in the
UserNotifications Framework
Location Trigger
let content = NotificationContent()
content.title = "You are going out from the UK"
content.subtitle = "A...
Show Notification In-App
class NotificationsManager: NSObject, UNUserNotificationCenterDelegate {
func userNotificationCent...
Control Over Notifications in
the Notifications Centre
Notifications Service
Extension
Attachments
One More Thing…
GIFs Supported
And Much More…
Unified across platforms
Icon badge support tvOS
watchOS Local Notifications
UI Notification Extensions
Same c...
Where to Go from Here
Introduction to Notifications:
https://developer.apple.com/videos/play/wwdc2016/707/
Advanced Notifica...
Thanks!
Twitter:
@dadederk
Web:
http://dadederk.com -> GitHub, Medium…
Make Notifications Great Again!
Upcoming SlideShare
Loading in …5
×

Make Notifications Great Again!

0 views

Published on

My first lighting talk at the Swift London Meetup on July about the new User Notifications framework that Apple presented in the WWDC 2016 as part of the new iOS 10 SDK.

http://www.meetup.com/swiftlondon/events/232249328/

Published in: Software
  • Be the first to comment

  • Be the first to like this

Make Notifications Great Again!

  1. 1. “MAKENOTIFICATIONS GREATAGAIN!” @dadederk
  2. 2. NOTIFICATIONS
  3. 3. Get Notification Settings UNUserNotificationCenter.current().getNotificationSettings { notificationSettings in print("Notification settings: (notificationSettings)") } <UNNotificationSettings: 0x7fc3dbc21490; authorizationStatus: NotDetermined, notificationCenterSetting: NotSupported, soundSetting: NotSupported, badgeSetting: NotSupported, lockScreenSetting: NotSupported, alertSetting: NotSupported, carPlaySetting: NotSupported, alertStyle: None> <UNNotificationSettings: 0x7f99a05266d0; authorizationStatus: Authorized, notificationCenterSetting: Enabled, soundSetting: Enabled, badgeSetting: Enabled, lockScreenSetting: Enabled, alertSetting: NotSupported, carPlaySetting: Enabled, alertStyle: Banner> <UNNotificationSettings: 0x7f93c3e282b0; authorizationStatus: Denied, notificationCenterSetting: Disabled, soundSetting: Disabled, badgeSetting: Disabled, lockScreenSetting: Disabled, alertSetting: NotSupported, carPlaySetting: Disabled, alertStyle: None>
  4. 4. Brexit App
  5. 5. What’s New in the UserNotifications Framework
  6. 6. Location Trigger let content = NotificationContent() content.title = "You are going out from the UK" content.subtitle = "At this point..." content.body = "Are you sure you want to leave the European Union?" content.categoryIdentifier = “poll" let trigger = UNLocationNotificationTrigger(region:region, repeats:false) let request = UNNotificationRequest(identifier: LocalNotificationType.localLocation.rawValue, content: notificationContent, trigger: trigger) UNUserNotificationCenter.current().add(request) { (error) in }
  7. 7. Show Notification In-App class NotificationsManager: NSObject, UNUserNotificationCenterDelegate { func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: () -> Void) { completionHandler() } func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: (UNNotificationPresentationOptions) -> Void) { completionHandler([.alert, .sound]) } }
  8. 8. Control Over Notifications in the Notifications Centre
  9. 9. Notifications Service Extension
  10. 10. Attachments
  11. 11. One More Thing…
  12. 12. GIFs Supported
  13. 13. And Much More… Unified across platforms Icon badge support tvOS watchOS Local Notifications UI Notification Extensions Same code path for Local and Remote
  14. 14. Where to Go from Here Introduction to Notifications: https://developer.apple.com/videos/play/wwdc2016/707/ Advanced Notifications: https://developer.apple.com/videos/play/wwdc2016/708/ UserNotifications API Reference Documentation: https://developer.apple.com/reference/usernotifications
  15. 15. Thanks! Twitter: @dadederk Web: http://dadederk.com -> GitHub, Medium…

×