danielrhodes / Swift-ActionCableClient

ActionCable is a new WebSocket server being released with Rails 5 which makes it easy to add real-time features to your app. This Swift client makes it dead-simple to connect with that server, abstracting away everything except what you need to get going.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

can't pass parameters from the client side to the server side when creating a subscription

guolijun opened this issue · comments

https://github.com/danielrhodes/Swift-ActionCableClient/blob/master/Pod/Classes/ActionCableClient.swift#L203 You can by using a ChannelIdentifier. Be warned this isn't really passing parameters as the identifier literally becomes part of how the channel is identified, so when you send messages from the server to the client, you need to specify those params. If you are looking for authentication, using the headers is better (in my opinion).

ok, thanks