Slide 1

Slide 1 text

What’s New in 
 Push Notifications? @samjarman • Carnival.io

Slide 2

Slide 2 text

@samjarman • #MobileRefresh Today 1. What’s new in notifications in iOS 10 and iOS 11 2. What’s new in notifications in Android O 3. Best practices for push notifications 4. AMA

Slide 3

Slide 3 text

@samjarman • #MobileRefresh Tweeting is OK! • Encouraged, even! • Take photos, ask questions! • I’ll get back to you after the talk :)

Slide 4

Slide 4 text

@samjarman • #MobileRefresh iOS 10 Changes

Slide 5

Slide 5 text

@samjarman • #MobileRefresh Big iOS 10 Changes • Revamped, enhanced API • Notification Service Extensions • Notification Content Extensions

Slide 6

Slide 6 text

@samjarman • #MobileRefresh Revamped API • UN* classes (User Notifications) • Same functionality + more • Robust API

Slide 7

Slide 7 text

@samjarman • #MobileRefresh Notable Improvements • Manage remote notifications • Control foreground appearance • Inspect responses - dismissed? • Collapsible and threaded notifications

Slide 8

Slide 8 text

@samjarman • #MobileRefresh Manage Remote Notifications • getDeliveredNotificationsWithCompletionHandler:
 - Provides you with a list of the app’s notifications that are still 
 displayed in Notification Center.
 • removeDeliveredNotificationsWithIdentifiers:
 - Removes the specified notifications from Notification Center.
 • removeAllDeliveredNotifications - Removes all of the app’s notifications from Notification Center.

Slide 9

Slide 9 text

@samjarman • #MobileRefresh Foreground Notifications • userNotificationCenter:willPresentNotification
 :withCompletionHandler: - Called when a notification is delivered to a foreground app.
 • Options: Alert, Badge and Sound. 
 - Alert looks similar to regular alert boxes.
 • Good place to override system UI for your own… 
 (and update your app accordingly)

Slide 10

Slide 10 text

@samjarman • #MobileRefresh User Action Handling • userNotificationCenter:didReceiveNotificationResponse:
 withCompletionHandler: - Called to let your app know which action was selected by 
 the user for a given notification.
 • UNNotificationResponse - DismissedAction and DefaultAction constants
 • UNTextInputNotificationResponse - Text typed in as property

Slide 11

Slide 11 text

@samjarman • #MobileRefresh Collapsible Notifications • Done from your push provider. • Two/N consecutive notifications with the same collapse-id header. • Download additional content.

Slide 12

Slide 12 text

@samjarman • #MobileRefresh Collapsible Notifications

Slide 13

Slide 13 text

@samjarman • #MobileRefresh Threaded Notifications • More power than collapsible notifications • Set a thread-id in the header • Read that thread-id in a notification service extension • Implementing threading yourself

Slide 14

Slide 14 text

@samjarman • #MobileRefresh New Extensions

Slide 15

Slide 15 text

@samjarman • #MobileRefresh Notification Service Extensions • Called before the user is shown an alert. • Chance to modify content. • Download additional content.

Slide 16

Slide 16 text

@samjarman • #MobileRefresh Notification Content Extension • Create your own UI for an extension. • Full storyboard access. • Non-interactive. • Format data in a readable, valuable way.

Slide 17

Slide 17 text

@samjarman • #MobileRefresh Learn More • Sessions 707, 708 – WWDC 2016

Slide 18

Slide 18 text

@samjarman • #MobileRefresh iOS 11 Changes

Slide 19

Slide 19 text

@samjarman • #MobileRefresh Hidden Notification Content

Slide 20

Slide 20 text

@samjarman • #MobileRefresh

Slide 21

Slide 21 text

@samjarman • #MobileRefresh Hidden Notification Content Example

Slide 22

Slide 22 text

@samjarman • #MobileRefresh

Slide 23

Slide 23 text

@samjarman • #MobileRefresh Hidden Notification Content • Now available for all apps in iOS 11 • Important for privacy of the user - often notification content is sensitive • Users tweak per application, because some could 
 be more sensitive than others • Default hidden text is “Notification”

Slide 24

Slide 24 text

@samjarman • #MobileRefresh Hidden Notification Content • You can define the hidden “default” text as a developer. • Respects thread-id if you’re using those and notification service extensions • Respects collapsible notifications • Supports notifications with images

Slide 25

Slide 25 text

@samjarman • #MobileRefresh Notification Preview Placeholder let chatsCategory = UNNotificationCategory(identifier:"chats", actions: [], intentIdentifiers:[], hiddenPreviewsBodyPlaceholder:"New chat")

Slide 26

Slide 26 text

@samjarman • #MobileRefresh String Formatters let chatsCategory = UNNotificationCategory(identifier:"chats", actions: [], intentIdentifiers:[], hiddenPreviewsBodyPlaceholder:”%u chats")

Slide 27

Slide 27 text

@samjarman • #MobileRefresh Using StringsDict files

Slide 28

Slide 28 text

@samjarman • #MobileRefresh StringsDict in use let chatsCategory = UNNotificationCategory(identifier:"chats", actions: [], intentIdentifiers:[], hiddenPreviewsBodyPlaceholder:NSLocalizedStrin g("COMMENTS_KEY", "comment placeholder")

Slide 29

Slide 29 text

@samjarman • #MobileRefresh Title and Subtitle control let chatsCategory = UNNotificationCategory(identifier:"chats", actions: [], intentIdentifiers:[], hiddenPreviewsBodyPlaceholder:”%u chats”, options: [.hiddenPreviewsShowTitle, .hiddenPreviewsShow Subtitle])

Slide 30

Slide 30 text

@samjarman • #MobileRefresh Learn more • http://carnival.io/mobile-insights/whats-new-ios-11-notifications/ • WWDC 2017 – Session 708

Slide 31

Slide 31 text

@samjarman • #MobileRefresh Android O Changes

Slide 32

Slide 32 text

@samjarman • #MobileRefresh Badges • Notification Dots • No numbers though Image from Ubergizmo

Slide 33

Slide 33 text

@samjarman • #MobileRefresh Channels • Notifications now arrive in a given channel, in an optional group • End users can tweak notification settings per channel/group • Developers are encouraged to split notifications into logical channels/groups

Slide 34

Slide 34 text

@samjarman • #MobileRefresh Channels

Slide 35

Slide 35 text

@samjarman • #MobileRefresh Channels • Settings for each channel are exposed - Sound/Vibration
 - Importance
 - Light/LED colour
 - Bypass do not disturb mode
 - Lockscreen

Slide 36

Slide 36 text

@samjarman • #MobileRefresh Channels Code Code examples: http://bit.ly/2xuLSnx

Slide 37

Slide 37 text

@samjarman • #MobileRefresh Tips for Channels • Effort on all of us to educate consumers about these settings • Deep link to settings screen • Consider not exposing these settings in your own app to avoid confusion • Group into logical groups and channels • If targeting O, must use Channels
 - If not, you can use it without worrying

Slide 38

Slide 38 text

@samjarman • #MobileRefresh Channels on… iOS? • iOS has Categories. • You can register Categories on launch, with buttons, text input, notification services and extensions. • Users not offered fine grain control over category alerts though. • Worth looking into, all new in iOS 8!

Slide 39

Slide 39 text

@samjarman • #MobileRefresh Best Practices

Slide 40

Slide 40 text

@samjarman • #MobileRefresh Notifications go to people, not devices.

Slide 41

Slide 41 text

@samjarman • #MobileRefresh 71% of app uninstalls are triggered by 
 Push Notifications.

Slide 42

Slide 42 text

@samjarman • #MobileRefresh Make them timely.

Slide 43

Slide 43 text

@samjarman • #MobileRefresh Respect local timezones.

Slide 44

Slide 44 text

@samjarman • #MobileRefresh Respect sleepy time.

Slide 45

Slide 45 text

@samjarman • #MobileRefresh Respect back-off times. ✋

Slide 46

Slide 46 text

@samjarman • #MobileRefresh Keep them relevant.

Slide 47

Slide 47 text

@samjarman • #MobileRefresh Personalise based on journey.

Slide 48

Slide 48 text

@samjarman • #MobileRefresh Personalise with names.

Slide 49

Slide 49 text

@samjarman • #MobileRefresh Use Emoji.

Slide 50

Slide 50 text

@samjarman • #MobileRefresh Use transactional push.

Slide 51

Slide 51 text

@samjarman • #MobileRefresh Use precise language.

Slide 52

Slide 52 text

@samjarman • #MobileRefresh Being a good citizen.

Slide 53

Slide 53 text

@samjarman • #MobileRefresh Ask for permission… Carefully.

Slide 54

Slide 54 text

@samjarman • #MobileRefresh ⚡ Pre-load content.

Slide 55

Slide 55 text

@samjarman • #MobileRefresh Represent notifications inside your app.

Slide 56

Slide 56 text

@samjarman • #MobileRefresh ⚙ Expose settings.

Slide 57

Slide 57 text

@samjarman • #MobileRefresh Use a 3rd party push service. DIY at your own risk.

Slide 58

Slide 58 text

@samjarman • #MobileRefresh PushNotifications.tips

Slide 59

Slide 59 text

@samjarman • #MobileRefresh Conclusion • iOS 10 and 11 expose great new API • Android exposes awesome power, but users needs to be educated about it • Respect your users with notifications

Slide 60

Slide 60 text

Thank You! Sam Jarman • iOS Developer, carnival.io • @samjarman

Slide 61

Slide 61 text

AMA!