You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For a complete example of a working app, see the [Example/](https://github.com/pusher/pusher-websocket-swift/tree/push-notifications/Example) directory in this repository. Specifically for push notifications code, see the [Example/AppDelegate.swift](https://github.com/pusher/pusher-websocket-swift/blob/master/iOS%20Example%20Swift/iOS%20Example%20Swift/AppDelegate.swift) file.
825
826
826
827
828
+
### Pusher delegate
829
+
830
+
There is a `PusherDelegate` that you can use to get access to events that occur in relation to push notifications interactions. These are the functions that you can optionally implement when conforming to the `PusherDelegate` protocol:
Again, the names of the functions largely give away what their purpose is but just for completeness:
839
+
840
+
-`didRegisterForPushNotifications` - use this if you want to know when a client has successfully registered with the Pusher Push Notifications service, or if you want access to the `clientId` that is returned upon successful registration
841
+
-`didSubscribeToInterest` - use this if you want keep track of interests that are successfully subscribed to
842
+
-`didUnsubscribeFromInterest` - use this if you want keep track of interests that are successfully unsubscribed from
The process is identical to that of setting up a `PusherConnectionDelegate`. At some point in the future the `PusherDelegate` and `PusherConnectionDelegate` will likely be merged into the `PusherDelegate` in order to provide one unified delegate that can be used to get notified of Pusher-related events.
874
+
875
+
827
876
## Testing
828
877
829
878
There are a set of tests for the library that can be run using the standard method (Command-U in Xcode).
0 commit comments