99import UIKit
1010import PusherSwift
1111
12- class ViewController : UIViewController , PusherConnectionDelegate {
12+ class ViewController : UIViewController , PusherDelegate {
1313 var pusher : Pusher ! = nil
1414
1515 @IBAction func connectButton( _ sender: AnyObject ) {
@@ -25,10 +25,10 @@ class ViewController: UIViewController, PusherConnectionDelegate {
2525
2626 // Only use your secret here for testing or if you're sure that there's
2727 // no security risk
28- let pusherClientOptions = PusherClientOptions ( authMethod: . inline( secret: " YOUR_APP_SECRET " ) )
29- pusher = Pusher ( key: " YOUR_APP_KEY " , options: pusherClientOptions)
28+ let pusherClientOptions = PusherClientOptions ( authMethod: . inline( secret: " daef58559fdd0aba8b63 " ) )
29+ pusher = Pusher ( key: " 568d5a3851502158a022 " , options: pusherClientOptions)
3030
31- pusher. connection . delegate = self
31+ pusher. delegate = self
3232
3333 pusher. connect ( )
3434
@@ -61,15 +61,15 @@ class ViewController: UIViewController, PusherConnectionDelegate {
6161 chan. trigger ( eventName: " client-test " , data: [ " test " : " some value " ] )
6262 }
6363
64- // PusherConnectionDelegate methods
64+ // PusherDelegate methods
6565
66- func connectionStateDidChange ( from old: ConnectionState , to new: ConnectionState ) {
66+ func changedConnectionState ( from old: ConnectionState , to new: ConnectionState ) {
6767 // print the old and new connection states
6868 print ( " old: \( old. stringValue ( ) ) -> new: \( new. stringValue ( ) ) " )
6969 }
7070
71- func subscriptionDidSucceed ( channelName : String ) {
72- print ( " Subscribed to \( channelName ) " )
71+ func subscribedToChannel ( name : String ) {
72+ print ( " Subscribed to \( name ) " )
7373 }
7474
7575 func debugLog( message: String ) {
0 commit comments