@@ -609,7 +609,7 @@ You can attach behaviour to these events regardless of the channel the event is
609609let pusher = Pusher(key: "YOUR_APP_KEY")
610610pusher.subscribe("my-channel")
611611
612- pusher.bind(callback: { (data: AnyObject ?) -> Void in
612+ pusher.bind(callback: { (data: Any ?) -> Void in
613613 if let data = data as? [String : AnyObject] {
614614 if let commenter = data["commenter"] as? String, message = data["message"] as? String {
615615 print("\(commenter) wrote \(message)")
@@ -640,7 +640,7 @@ These are bound to a specific channel, and mean that you can reuse event names i
640640let pusher = Pusher(key: "YOUR_APP_KEY")
641641let myChannel = pusher.subscribe("my-channel")
642642
643- myChannel.bind(eventName: "new-price", callback: { (data: AnyObject ?) -> Void in
643+ myChannel.bind(eventName: "new-price", callback: { (data: Any ?) -> Void in
644644 if let data = data as? [String : AnyObject] {
645645 if let price = data["price"] as? String, company = data["company"] as? String {
646646 print("\(company) is now priced at \(price)")
@@ -668,7 +668,7 @@ Errors are sent to the client for which they are relevant with an event name of
668668
669669#### Swift
670670```swift
671- pusher.bind({ (message: AnyObject ?) in
671+ pusher.bind({ (message: Any ?) in
672672 if let message = message as? [String: AnyObject], eventName = message["event"] as? String where eventName == "pusher:error" {
673673 if let data = message["data"] as? [String: AnyObject], errorMessage = data["message"] as? String {
674674 print("Error message: \(errorMessage)")
@@ -724,7 +724,7 @@ You can remove previously-bound handlers from an object by using the `unbind` fu
724724let pusher = Pusher (key : " YOUR_APP_KEY" )
725725let myChannel = pusher.subscribe (" my-channel" )
726726
727- let eventHandlerId = myChannel.bind (eventName : " new-price" , callback : { (data : AnyObject ? ) -> Void in
727+ let eventHandlerId = myChannel.bind (eventName : " new-price" , callback : { (data : Any ? ) -> Void in
728728 ...
729729})
730730
0 commit comments