Closed SamJWeissman closed 4 years ago
Does the group string have to be exactly the same as the bundle id?
My issue:
My string is <string>group.com.{company}.oneSignal</string>
But my bundle id's are as follow
com.{company}.{whitelabelAppName}.{env}
Would I have to create groups that are explicitly the same as the bundle id?
Update:
I had to set the OneSignal_app_groups_key
inside my app info.plist and the OneSignalNotificationServiceExtension/info.plist
and it worked 🙂
See previous comments for solution
Like several have pointed out, follow the instructions for setting up an App Group. At least that worked for me. The following is from the OneSignal documentation:
Please follow this guide to set up a OneSignal app group in your app.
OneSignal_app_groups_key
yo @karltaylor , what string did you give for OneSignal_app_groups_key
in Info.plist
and OneSignalNotificationExtensionService/Info.plist
? because I see you have this format com.{company}.{whitelabelAppName}.{env}
for bundle id. Like the OneSignal default one com.{company}.{whitelabelAppName}.{env}.onesignal
or just your bundle id com.{company}.{whitelabelAppName}.{env}
?
@rgomezp after following instructions from the documentation and this page, I can confirm this problem still occurs. Using v2.11.1; Not using the badge plugin.
Main Target (the 'l' of 'onesignal' is cut off by XCode, but I double checked, it is definitely there):
OneSignalNotificationServiceExtension Target:
Main app entitlement file:
OneSignalNotifcationServiceExtension entitlement file:
Main app info.plist:
OneSignalNotifcationServiceExtension info.plist:
The following behaviour occurs:
I haven't set OneSignal_disable_badge_clearing because I want the badge to be automatically cleared when the app is opened.
Did I miss anything?
We had a problem which lokoed like 2 different counters on our IOS app: When the app set the number of badges, this number appeared well on the app badge.
But out of the app, when OneSignal sent a notification (with ios_badgeType: 'Increase' and ios_badgeCount: 1), the badge number restarted from 1 (and increased by 1 at each push notification).
Finally, the problem was a wrong App group set in XCode.
As soon as we changed it to be group.EXACT_BUNDLE.onesignal
, it worked :)
Hope it can help.
Hi @@chagaspac , In IOS, we are unable to reset the badge number when we click the pushwoosh notification Would you be able to fix this?
Description:
Push notifications and incrementing of the badge count all work perfectly. Unfortunately, while the badge is "cleared", when a new notification comes through, it resumes with the previous badge count rather than starting from 0.
Environment
cordova plugin list
or copy-pasting your config.xml)cordova-plugin-hockeyapp 5.1.2 onesignal-cordova-plugin 2.4.5 ccordova-plugin-splashscreen 5.0.2 cordova-plugin-device 2.0.2 cordova-plugin-whitelist 1.3.3 cordova plugin-wkwebview-engine 1.1.4 corova-plugin-wkwebview-file-xhr 2.1.1 cordova-plugin-inappbrowser 3.0.0 cordova-plugin-web-share 1.1.0 cordova-plugin-network-information 2.0.1
ios engine 4.5.5
Steps to Reproduce Issue:
Note: Not sure if this is relevant. The .ipa is currently being downloaded from HockeyApp. We've pushed/downloaded several versions throughout the development phase ( we're still waiting for review from Apple ). I'm not sure if that would make any difference in the issue we're seeing.Can confirm that this issue is seen when downloading from the App Store as well