Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send deviceToken to Ably clients which already have been instantiated #277

Merged
merged 8 commits into from Dec 10, 2021

Conversation

ben-xD
Copy link
Contributor

@ben-xD ben-xD commented Dec 6, 2021

This PR does 2 things:

  • It fixes Investigate push activation not completing on iOS when running in release configuration #276
  • It allows users to give Ably flutter the device token if they're having issues activating push with Ably. This happens because in some cases (e.g. a customer), didRegisterForRemoteNotifications does not get called in Ably Flutter when running on iOS. This might happen due to method swizzling by other dependencies. This is a workaround for users who cannot fix the fact didRegisterForRemoteNotifications is not being called in Ably Flutter.

@ben-xD ben-xD added the bug Something isn't working. It's clear that this does need to be fixed. label Dec 6, 2021
@ben-xD ben-xD self-assigned this Dec 6, 2021
@github-actions github-actions bot temporarily deployed to staging/pull/277/dartdoc December 6, 2021 10:53 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/277/dartdoc December 7, 2021 08:08 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/277/dartdoc December 8, 2021 08:37 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/277/dartdoc December 8, 2021 08:47 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/277/dartdoc December 8, 2021 08:58 Inactive
@ben-xD ben-xD marked this pull request as ready for review December 8, 2021 12:34
@github-actions github-actions bot temporarily deployed to staging/pull/277/dartdoc December 8, 2021 16:33 Inactive
@ben-xD
Copy link
Contributor Author

ben-xD commented Dec 8, 2021

@lukasz-szyszkowski , I would like to change the pattern of calling a method in the singleton instance of AblyInstanceStore, seen in AblyInstanceStore.sharedInstance().didRegisterForRemoteNotifications(withDeviceToken: deviceToken), to a static method in AblyFlutter itself:

For example, it would be nicer if the user did:

AblyFlutter.didRegisterForRemoteNotifications(withDeviceToken: deviceToken)

Could I get some help with improving this code?

Copy link
Contributor

@ikbalkaya ikbalkaya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@QuintinWillison
Copy link
Contributor

We're pressured for time to get a release out. So, I'm going to land this work despite having not observed checks pass yet, due to the fact that the most recent commit should not fail CI and the preceding commit passed CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working. It's clear that this does need to be fixed.
Development

Successfully merging this pull request may close these issues.

Investigate push activation not completing on iOS when running in release configuration
4 participants