Onesignal-ios-sdk: BETA 3.0.0 V2 - Badge does not clear on App Open or Notification Tap

Created on 13 Nov 2020  路  2Comments  路  Source: OneSignal/OneSignal-iOS-SDK

Description:
Just updated to Beta3.0.0 V2
Push notifications usually clear automatically when 1) the app is opened or 2) the push notification is tapped.
Neither appears to be working.

Environment

  1. iOS SDK - Beta3.0.0 V2
  2. Cocoapods

Steps to Reproduce Issue:

  1. Install iOS SDK version 3.0.0 V2 with Cocoapods into a project
  2. Receive a push notification with Badge set to X > 0
  3. Tap Notification OR simply open app
    Return to home screen to see red badge still active and set to X > 0

Worked fine with non-BETA version of the SDK

Any help would be greatly appreciated. Thank you.

Edit: Just a quick note I can still manually force the application badge to 0 using the code below, but OneSignal used to do this automatically.

  • (void)applicationDidBecomeActive:(UIApplication *)application
    {
    [[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];
    }
Medium Priority

All 2 comments

@idefen1 Thank you for reporting I have reproduced and found the cause of the issue. This should be fixed with the next version of the major release

Closing with fix PR

Was this page helpful?
0 / 5 - 0 ratings