RemoteNotification.applicationIconBadgeNumber is read only, which means I cannot change the badge locally.
I know I gotta use the server to track the badge number. But the situation is, once I received the push notification and activate the app, I upload the data, telling the server “I’ve got your notification”, so that the badge number on the server’s end will reset to 0. But the problem is I cannot change the badge num locally, so the App’s badge number didn’t change.
In order to do that, I gotta let the server send an extra msg after he receives the “I’ve got your notification” msg, telling the App “okay. reset the badge num now”. What an extra work!
Do I have any way to modify/reset/clear the application’s badge number on App’s end in Unity3d?
Thanks Fattie. I’m now using the Obj-C in Xcode to set the badge number. Problem solved. But I’m still curious about how Unity3D’s gonna set that value. And I’m wondering what’s the purpose of make the badge number a read-only in Unity
I’m still struggling with setting the badge through Unity code. If you just want to get rid of the badge whenever the app starts or resumes then add this you your plugins folder.