Bundle ID Improvement #377
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
• In order to allow communication between the App Extension and the host/primary application, OneSignal SDK uses an app group to perform communication
• For most developers, the name of the app group will simply be group.{your_bundle_id}.onesignal
• The SDK can automatically retrieve this bundle ID, but previously, for the app extension service, this was broken because it was only retrieving the bundle ID for the OneSignalNotificationServiceExtension
• This means the bundle ID's would not have matched and badge count would be inconsistent. This commit fixes the issue by using a method to retrieve the host app's bundle ID.
Note 1
Users can override this app group name by adding a
OneSignal_app_groups_keyvalue to theirinfo.plistfor both the main app and extension service.Note 2
This PR also changes the example/demo app in a few ways to avoid confusion. We removed a method that would set the badge count to 11 whenever a notification is received, and we enabled automatic badge clearing.
This change is