pusher / pusher-http-php

PHP library for interacting with the Pusher Channels HTTP API
https://pusher.com/docs/server_api_guide
1.41k stars 307 forks source link

Cannot Connect With iOS #260

Closed AugmentBLU closed 3 years ago

AugmentBLU commented 3 years ago

Hi,

We're using the Pusher php server within Laravel and everything is working very well, we're able to utilise the socket service within our web app flawlessly; however with iOS we're unable to connect. I'm not an iOS dev but I sat with our dev for a couple hours trying to debug why we're unable to establish a connection and with little to no debug info, we're finding it incredibly difficult to figure the potential issues out.

The iOS dev setup a test account with the official Pusher service and he can connect to that no problem but not to the dedicated service we're running using this package. We would go with using the official service but with limits of 10kb for payloads, it's not usable for our needs so we are going round in circles. I know there's a dedicated cluster solution but I'm guessing this is fairly expensive and we're a start-up business so need to find viable solutions until revenue trickles in.

Has anyone managed to connect to the Pusher php server with Swift/Pusher SDK? If so, did you have any hurdles to overcome that might point us in the direction why we're facing the connection issue? I'm convinced it's possible, it's either an Apple security policy, CORS or some other connection step but with no real debug info and no evidence the iOS is even hitting the server, it's hard to establish the problem.

We're using this package which integrates Pusher PHP with Laravel, https://github.com/beyondcode/laravel-websockets. It works great with the web app side, just a no go with iOS. I have also asked for help over there but nothing has come from it yet. Just wondering if maybe there's anyone here with iOS experience.

Any pointers would be great! A bounty will also be available if we're able to get a working solution.

benw-pusher commented 3 years ago

Hi, I don't think this is necessarily a bug in our library. Our libraries are designed for interaction with the official Channels service, and we can't guarantee support for third party services or Pusher/Channels replacement services such as laravel-websockets. I've left the issue open for a few days in the hope someone might be able to help you out, but can see you are engaged in discussion over at the laravel-websockets issue so I'll close this off now.