To receive messages from other users in real-time, you must subscribe to the desired channels first.
Click to copy the blue snippets and then paste them into your code.import UIKit import PubNub import PubNubBridge @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? var client: PubNub? func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { self.client = PubNub.client() self.client?.addListener(self) self.client?.subscribeToChannels(["lobby"], withPresence: false) return true } }