I want to add my app custom token in Pusher header. Below is my code.
OCAuthMethod *authMethod = [[OCAuthMethod alloc] initWithAuthEndpoint:kPushedWebHockUrl];
OCPusherHost *host = [[OCPusherHost alloc] initWithCluster:kPusherClusterId];
PusherClientOptions *options = [[PusherClientOptions alloc] initWithOcAuthMethod:authMethod attemptToReturnJSONObject:YES autoReconnect:YES ocHost:host port:nil encrypted:YES activityTimeout:nil];
self.pusher = [[Pusher alloc] initWithAppKey:kPusherKey options:options];
self.pusher.connection.delegate = self;
[self.pusher connect];
If you trying to make an Authorized connection for Pusher, then try using the PTPusherChannelAuthorizationDelegate by which you can make the authentication API and share the response data to Pusher.
You can set the delegate for the Pusher object as
Then implement the deleagte function in your class
Hope this helps.