The community forums are in BETA and closed to the public.

How to solve could not find member 'addListener'


I followed this guide:

for integrating pubnub with Swift.

In my AppleDelegate, I can publish messages fine, but I can't receive messages because



could not find member 'addListner'.

Any help would be great,

var client:PubNub?

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject:          AnyObject]?) -> Bool {
    let config = PNConfiguration( publishKey: "Your_Pub_Key", subscribeKey: "Your_Sub_Key")   

    client = PubNub.clientWithConfiguration(config)  


    client?.subscribeToChannels(["Your_Channel"], withPresence: false)   

    client?.publish("Swift + PubNub!", toChannel: "demo", compressed: false, withCompletion: nil)


Can we see a code sample from your app delegate? It's hard to offer help without knowing the context

Added code for the AppDelegate

Comments to this discussion are now closed!