I'm using Pusher for real chat application.
I've created a web app and a mobile app using Ionic 4.
The app use private channels, and everything works well on web enviroment. During development i've tested the Ionic app on browser (ionic serve) and the chat works very well.
When I tried to test the app on a real IOS Device (also XCode emulator), i get an error in channel subscribtion
Unable to retrieve auth string from auth endpoint - received status 0 from https://...
I've tested the endpoint and works fine, even if I try to simulate the connection from the device as a simple API.
So I cannot understand where is the problem. If I use a default channel (so no private) everything works fine also on IOS Device.
I'm thinking the problem should be on some Cordova/Ionic configuration?
Here's the code I use for Pusher setup and subscription (works if run on the browser with ionic)
this.pusher = new Pusher(this.environment.pusherKey, {
cluster: 'eu',
encrypted: true,
authEndpoint: this.mainService.hostEndpoint + 'user/pusherAuth',
});
this.pusher.subscribe(channelName)
Who's the hero who can help me solve this problem? :) I don't want to rollback on the not a private channel just as a workaround for the problem.