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

Topics do not work with watchOS #6160

Closed
jlandrum opened this issue Jul 29, 2020 · 2 comments · Fixed by #6209
Closed

Topics do not work with watchOS #6160

jlandrum opened this issue Jul 29, 2020 · 2 comments · Fixed by #6209

Comments

@jlandrum
Copy link

If you attempt to sub to a topic, the callback never calls indicating a success or failure.

The reason is due to self.pubsub being undefined, and a message is being sent to self.pubsub with the completion without a null check:

[strongSelf.pubsub subscribeToTopic:normalizeTopic handler:completion];

There's this line:


Which blocks initialization of self.pubsub - however when this is removed, there appears to be no problems. Topics work fine on a standalone watchOS after removing these preprocessor statements.

Is there any particular reason as to why? I'm assuming something else is not working properly with notifications is why - I will gladly help update the code if need be to get this working, as topics are something we need on our end.

@google-oss-bot

This comment has been minimized.

@charlotteliang
Copy link
Contributor

Thanks @jlandrum Good catch on the issue. Yes the topic subscription should be working on watchOS and the macro is not correctly set.
The reason we set it for now is that to prevent direct channel from running as it's not available in watchOS, so uncomment it will have a lot of unexpected code from running the resources. Feel free to comment out the macro for the quick fix for now, I will kick off a PR that refactors the pubsub to be called without relying on direct channel logic.

@paulb777 paulb777 added this to the 6.31.0 - M78 milestone Aug 6, 2020
@firebase firebase locked and limited conversation to collaborators Sep 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants