2.5.0 Release
Permission and Subscription methods + Misc fixes & Improvements
New methods
getPermissionSubscriptionState- Returns an object with permission and subscription instances with:
subscription.userId,subscription.pushToken,subscription.useSubscriptionSettings,permission.hasPrompted,permission.status
addPermissionObserveronPermissionChangedwill fire when user changes iOS notification settings.- Includes Accepting, Declining, Prompting, and toggling iOS notifications in Settings after going back to the app.
addSubscriptionObserveronSubscriptionChangedwill fire when notification subscription properties change.- Includes
userId,pushToken,userSubscriptionSettings, andsubscribed
promptForPushNotificationWithUserResponse:method. Use instead ofregisterForPushNotifications. This new method accepts a callback that will fire when the prompt is answered.- Added
inFocusDisplayTypeproperty. Use instead ofkOSSettingsKeyInFocusDisplayOption. This new property can be set at anytime in your app.
Documentation:
See the OneSignal SDK API documentation for full details on the new methods listed above.
Improvements
- Can now set
app_idas part of the payload topostNotificationto send to another app. - Fixed extra network calls in some edge cases.