Introduces support for new iOS 12 features. To learn more about how iOS 12 changes push notifications, please read our blog post on the subject.
Provisional/Direct To History Notifications
• Provisional notifications are a new way to message users without requesting their permission to send push notifications. Unlike traditional notifications, a provisional notification is sent directly to the Notification Center and does not alert/disturb the user directly.
• To use Provisional notifications, set kOSSettingsKeyAutoPrompt
to false
in your initialization settings. Then, navigate to https://www.onesignal.com and in your iOS platform settings, enable Direct To History notifications. From now on, all users that open your app will be able to receive provisional notifications unless they explicitly disable notifications for your app
Manage App Notification Settings
• iOS 12 introduces support to let your app provide a deep link to manage settings from within your app.
• To enable this, please set our init setting kOSSettingsKeyProvidesAppNotificationSettings
to true
. You also need to implement a UNUserNotificationCenterDelegate
method to present your custom Notification Settings UI.
Thread-ID Support
• iOS 12 also introduces Notification Grouping which allows you to group related notifications together. To do this, set the thread-id
parameter in your push notifications. iOS will automatically group notifications with the same thread-id
together.
Bug Fixes & Improvements
• Fixes an issue with Xcode 10 that caused crashes to the IBDesignables agent and made users unable to use IBDesignable views in storyboards/xibs
• Adds a new reachable
parameter to the OSPermissionState
. This new parameter indicates if the user is reachable and can receive notifications, and will be true
if they've (A) accepted notification permission or (B) are registered to receive provisional/direct-to-history notifications.