Setting up badges
Starting with version 6.4.0 of Pushwoosh iOS SDK, the process of managing and setting badges through push notifications has changed.
If you were previously using the badges number to indicate the number of received push notifications in your application, you have to migrate to newer version of iOS SDK (6.4.0 or later). The older versions will be supported until the end of the second quarter of 2022.
How to set up badges
To set up badges, follow the steps below:
- Add Notification Service Extension (File -> New -> Target…)
- Select the “Notification Service Extension”
- Copy the code from the code block and add it to your project as shown in the pictures below:
- Add the App Groups capability for each target of your application
- Add the App Groups ID
Add the App Groups ID to your info.plist for each target of your application:
If you do not want to use the info.plist file, use the method below and add the code to your NotificationServiceExtension class:
Send a push notification with badges
If you want to send push notification with badges from Pushwoosh Control Panel, just add a desired badge value to the badges text field as shown in the picture below:
Share your feedback with us
Your feedback helps us create a better experience, so we would love to hear from you if you have any issues during the SDK integration process. If you face any difficulties, please do not hesitate to share your thoughts with us via this form.