Closed DorianSaboBM closed 4 years ago
Could you be calling PusherService().subscribe();
too early?
_initializePusherService
is async, so if you start the app and the initializing hasn't finished before you code in initstate happens you may run into issues. Perhaps on Android it happens fast enough that this issue doesn't happen.
@MisterJimson Thanks for your answer. I don't think the problem is in sync because when I wrap my whole subscribe method in 5 seconds delay it still doesn't receive the data. If you (or someone else) have a working code for iOS I would be very grateful if you could share it here.
There are 2 examples projects in this repo. Both work for me without issue on Android and iOS.
Are you still having this issue? Did the examples work for you?
pusher_websocket_flutter: ^0.1.1
The code shown below is successfully initialized, connected and subscribed to pusher service but doesn't receive data from the channel.bind method. If I put logs in _initializePusherService and subscribe I can see them, but not from inside channel.bind.
Tested and does not work:
Note: This code works perfectly on any android version and device. (Receiving data)
Reproducible code
I am importing this class in main.dart fail and calling it like this
Here is my flutter doctor -v