Push notifications badge number on iOS device not reset on reinstallation of app via TestFlight

Hi everyone,

I’ve just built an app using local push notifications for iOS. The example I used was lifted directly from http://docs.coronalabs.com/guide/events/appNotification/index.html

From my understanding of the documentation -  in iOS the native.setProperty( “applicationIconBadgeNumber”) is just a getter/setter function that updates the badge number on the device.

The client is complaining that the number of push notifications don’t reset when they reinstall a new version of the app (via Testflight) on their device. This is happening even when the notification badge is set to 0 and then they reinstall a new version and it resets to 2 without even opening the app.

Notification are set and cancelled within a single table and they are only set once so I don’t think there is an issue of logic. When the app starts for the first time though I clear all the notifications but they have to open the app first.

Unfortunately I don’t have any code to share but really any information badge numbers in iOS and push-notifications would be helpful. Has anyone experienced a similar problem?

Thanks,

/Topher.

How are you setting the badge number? This thread suggests using the below code to “reset” badge numbers:

native.setProperty( "applicationIconBadgeNumber", 0 )

Are you already attempting to use this call?

The client said that the badge number was not being reset on reinstallation but this doesn’t appear to be the case.

I am using the native.setProperty to clear the badge and that is working too.

Strange.

I have even removed app and installed again and the badge count is retaining or been some other number. Not too sure on the specifics because when opening its resetting the badge count correctly so I have not given it any special thought.

Hey Jonjonsson.

So you’ve come across a similar situation and to resolve it you clear the badge on first time app startup or resume?

How are you setting the badge number? This thread suggests using the below code to “reset” badge numbers:

native.setProperty( "applicationIconBadgeNumber", 0 )

Are you already attempting to use this call?

The client said that the badge number was not being reset on reinstallation but this doesn’t appear to be the case.

I am using the native.setProperty to clear the badge and that is working too.

Strange.

I have even removed app and installed again and the badge count is retaining or been some other number. Not too sure on the specifics because when opening its resetting the badge count correctly so I have not given it any special thought.

Hey Jonjonsson.

So you’ve come across a similar situation and to resolve it you clear the badge on first time app startup or resume?