PubNub version : PubNub (= 3.7.11)
In my app i do the following (viewDidLoad)
"PNConfiguration *configuration = [PNConfiguration configurationForOrigin:kPubNubURL
publishKey:kPubNubPublishKey
subscribeKey:kPubNubSubscribeKey
secretKey:kPubNubSecretKey
cipherKey:kPubNubCipherKey];
configuration.useSecureConnection = YES;
self.pubNub = [PubNub connectingClientWithConfiguration:configuration andSuccessBlock:^(NSString *origin) {
[self.pubNub setDelegate:self];
[self.pubNub setClientIdentifier:self.myselfChatMember.chatId];
self.channel = [PNChannel channelWithName:[self channelKey] shouldObservePresence:NO];
[self.pubNub subscribeOn:@[self.channel]];
[self loadChatHistory];
} errorBlock:^(PNError *error) {
DLog("%@",error);
}];"
Then in my dealloc
[self.pubNub setDelegate:nil];
[self.pubNub unsubscribeFrom:@[self.channel]];
[self.pubNub disconnect];
self.pubNub = nil;
}
If i pop that controller ocasionally i get a crash.
Seems like after the PubNub object is released is still trying to call a notification.