github OneSignal/OneSignal-iOS-SDK 2.5.0
2.5.0 Release

latest releases: 5.1.5, 5.2.0-beta-01, 5.1.4...
7 years ago

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
  • addPermissionObserver
    • onPermissionChanged will fire when user changes iOS notification settings.
    • Includes Accepting, Declining, Prompting, and toggling iOS notifications in Settings after going back to the app.
  • addSubscriptionObserver
    • onSubscriptionChanged will fire when notification subscription properties change.
    • Includes userId, pushToken, userSubscriptionSettings, and subscribed
  • promptForPushNotificationWithUserResponse: method. Use instead of registerForPushNotifications. This new method accepts a callback that will fire when the prompt is answered.
  • Added inFocusDisplayType property. Use instead of kOSSettingsKeyInFocusDisplayOption. 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_id as part of the payload to postNotification to send to another app.
  • Fixed extra network calls in some edge cases.

Fixes

  • Media attachments 5MB and over now display. Issue #212 -Regression 2.4.0
  • kOSSettingsKeyInFocusDisplayOption resets when calling removePersistentDomain. Issue #185
  • Notification action buttons not showing when app is in focus - Issue #216 -Regression 2.4.0

Don't miss a new OneSignal-iOS-SDK release

NewReleases is sending notifications on new releases.