Skip to content

Conversation

@Nightsd01
Copy link
Contributor

@Nightsd01 Nightsd01 commented May 29, 2018

• 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_key value to their info.plist for 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 Reviewable

• 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.
@Nightsd01 Nightsd01 requested a review from jkasten2 May 29, 2018 22:29
@jkasten2
Copy link
Member

jkasten2 commented Jun 5, 2018

:lgtm:


Review status: all files reviewed at latest revision, all discussions resolved, all commit checks successful.


Comments from Reviewable

@Nightsd01 Nightsd01 merged commit 6c77587 into master Jun 6, 2018
baptiste-nv added a commit to nventive/OneSignal-iOS-SDK that referenced this pull request Jul 11, 2018
* Fix HTTP Race Condition (OneSignal#372)

* Fix HTTP Concurrency

• Fixes a relatively rare issue that would be encountered if the SDK attempted to make concurrent HTTP requests during an invalid situation, such as after the user has revoked GDPR consent
• The SDK was previously using a semaphore to wait for a batch of HTTP requests to finish.
• However, if the SDK immediately fails the request (synchronously), the request would fail before the SDK started waiting for the request to finish, resulting in a permanently blocked queue.
• Switched to using a dispatch_group which would handle this situation better. Also added a missing GDPR consent check to the onFocus methods

* Remove Debug Statement

• Removes a debug statement from the previous commit

* 2.8.5 Release

• Resolves a rare concurrency issue with the SDK's HTTP client

* Miscellaneous Fixes (OneSignal#370)

* Miscellaneous Fixes

• Fixes an issue where the download method for attachments wasn't correctly implemented with a double pointer. It accepted NSError as a parameter, but because this pointer gets copied, any new assignments will apply to the copied pointer, not the original.
• Fixes an issue in setEmail() where the failure block was being called without verifying that it is nonnull, which could cause crashes.
• Cleans up the notificationReceived() method, which created a string (actionSelected) but doesn't use it.

* Fix Method Signature

• A recent bug fix changed the signature of a helper method to synchronously download files
• Fixes the method signature so the swizzled test override method works and doesn't crash the test

* Bundle ID Improvement (OneSignal#377)

• 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.

* Update location tracking + add significant location changes monitoring (#1)

* Disable fine location tracking when app is background (#3)

* Ensure location tags are properly updated with no delay (#4)

* Update location tracking method
@Jeasmine Jeasmine deleted the app_bundle_id branch May 12, 2020 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants