pusher / pusher-websocket-swift

Pusher Channels websocket library for Swift
https://pusher.com/channels
MIT License
273 stars 167 forks source link

Issue with Pusher integration using pusher_channels_flutter in iOS #412

Closed mohamedsalah414 closed 1 year ago

mohamedsalah414 commented 1 year ago

I am sorry for this issue I am using pusher_channels_flutter to connect pusher with my Flutter project and It's not working in iOS. so I have followed the installation steps provided in this repository, including the setup in Xcode, but I am still unable to get it working.

mohamedsalah414 commented 1 year ago

Remove authEndpoint: url from the init function as it's only used in the web version, causing issues on iOS.

 await pusher.init(
        apiKey: 'f****************',
        cluster: 'eu',
        onConnectionStateChange: onConnectionStateChange,
        onError: onError,
        onSubscriptionSucceeded: onSubscriptionSucceeded,
        onEvent: onEvent,
        onSubscriptionError: onSubscriptionError,
        onDecryptionFailure: onDecryptionFailure,
        onMemberAdded: onMemberAdded,
        onMemberRemoved: onMemberRemoved,

        // authEndpoint: "<Your Authendpoint Url>",  Just delete this line

        onAuthorizer: onAuthorizer,
      );