File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -527,7 +527,7 @@ let pusher = Pusher(key: "YOUR_APP_KEY")
527527
528528let chan = pusher.subscribeToPresenceChannel("presence-channel")
529529
530- let _ = chan.bind(eventName: "pusher:subscription_succeeded", callback: { data in
530+ chan.bind(eventName: "pusher:subscription_succeeded", callback: { data in
531531 print("Subscribed!")
532532 print("I can now access myId: \(chan.myId)")
533533 print("And here are the channel members: \(chan.members)")
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ open class PusherChannel: NSObject {
6262
6363 - returns: A unique callbackId that can be used to unbind the callback at a later time
6464 */
65- open func bind( eventName: String , callback: @escaping ( Any ? ) -> Void ) -> String {
65+ @ discardableResult open func bind( eventName: String , callback: @escaping ( Any ? ) -> Void ) -> String {
6666 let randomId = UUID ( ) . uuidString
6767 let eventHandler = EventHandler ( id: randomId, callback: callback)
6868 if self . eventHandlers [ eventName] != nil {
Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ let CLIENT_NAME = "pusher-websocket-swift"
114114
115115 - returns: A unique string that can be used to unbind the callback from the client
116116 */
117- open func bind( _ callback: @escaping ( Any ? ) -> Void ) -> String {
117+ @ discardableResult open func bind( _ callback: @escaping ( Any ? ) -> Void ) -> String {
118118 return self . connection. addCallbackToGlobalChannel ( callback)
119119 }
120120
You can’t perform that action at this time.
0 commit comments