Created
October 19, 2015 15:19
-
-
Save redfearnk/26a0d553dd8031649a77 to your computer and use it in GitHub Desktop.
PubNub client setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let config = PNConfiguration(publishKey: self.publishKey, subscribeKey: self.subscribeKey) | |
config.origin = "pubsub.pubnub.com" | |
self.pubNubClient = PubNub.clientWithConfiguration(config) | |
self.pubNubClient?.addListener(self) | |
self.pubNubClient?.subscribeToChannels([channel], withPresence: true) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment