I´m working with MultipeerConnectivity Apple framework. Connection, advertiser and browser seems to work very well until now but I notice that when my any session connects a peer an then it disconnects for any reason my MCNearbyServiceBrowser
still finding that peer even if it doesn´t exist anymore. Obviously MCSession
reports a not connected status with the peer.
Does anyone has an idea of why this is happening?
I have override the dealloc method in my mc handler class like this:
- (void)dealloc
{
[self.session disconnect];
self.peerId = nil;
self.session = nil;
self.browser = nil;
self.advertiser = nil;
self.session.delegate = nil;
self.browser.delegate = nil;
self.advertiser.delegate = nil;
}
And I also have a tear down method:
- (void)teardownService
{
[self.session disconnect];
self.session = nil;
self.advertiser = nil;
self.browser = nil;
self.session.delegate = nil;
self.browser.delegate = nil;
self.advertiser.delegate = nil;
}
This issue happen with all the devices.