OneSignal is a popular tool for increasing engagement and retaining users in mobile apps using push notifications – there are many reasons why WebViewGold offers OneSignal by default. However, sometimes, the “Increase by” badge option of OneSignal may not work 100% properly on the WebViewGold app template setup for iOS – depending on its OneSignal configuration – while the “Set to” badge option works just fine. This can be a frustrating issue, but don’t worry, it can be fixed with a few simple steps.
Step 1: Create Groups Using the App Groups Option
One main reasons why the “Increase by” option may not work is that the OneSignal extension is not sharing data with the app. To resolve this issue, you need to create groups using the App Groups section of Xcode. The groups need to be the same for both targets (WebViewGold and OneSignalNotificationServiceExtension) so that the OneSignal extension can share the data with the app.
To create groups, follow the guide provided by OneSignal: https://documentation.onesignal.com/docs/ios-sdk-app-groups-setup.
See the screenshots below for both the WebViewGold and OneSignalNotificationServiceExtension targets:
Step 2: Remove and Add the OneSignal Extension
Another potential reason why the “Increase by” option may not work is that the OneSignal extension app link to the app itself has become detached. To resolve this issue, you need to remove the OneSignal extension from the attached screen and add it again, as shown in the screenshot below:
To remove and add the OneSignal extension link, simply follow these steps:
By following these two simple steps, you should be able to fix the “Increase by” option of the OneSignal push badge on the WebViewGold app template setup. If you encounter any further issues, don’t hesitate to reach out to the WebViewGold support team & the OneSignal support team for assistance.