-
Notifications
You must be signed in to change notification settings - Fork 130
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
Private channel not receiving pusher events. #285
Comments
Does your client correctly subscribe to the private channel? Have you set up a functioning auth endpoint that authenticates subscriptions to the channel? |
yes. I am receiving with the public channel and also trigger the event from the client-side. |
With this listen to the events.
[channel bindToEventNamed:@"my-event" handleWithBlock:^(PTPusherEvent *channelEvent) {
|
Just to confirm, are you replacing the public channel code with the private channel code? If not, you may need to change the var name: Do you see the subscription attempt is successful in the debug console for your app in the Pusher Dashboard? |
yes. I have received the subscription is completed. my function looks like this:
In this returning PTPusherChannel instance. Here is the required private channel instance.
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I've edited your comments into one longer comment. Just to confirm, you are correctly seeing the didSubscribeToChannel callback output that you have subscribed to the private channel? What is the channel name you are using, and have you confirmed the name is the same in your client and server code? |
// Channel Subscribed******
self.channel = [self.pusherClient subscribeToPrivateChannelNamed:channelName];
// Channel Event Listening******
[self.channel bindToEventNamed:@"new-message" handleWithBlock:^(PTPusherEvent *channelEvent) {
// channelEvent.data is a NSDictianary of the JSON object received
NSLog(@"message received: %@", channelEvent.data);
}];
The text was updated successfully, but these errors were encountered: