I figured that multipeer connectivity sometimes has issues with reconnecting. Whenever I try to reconnect to the client that I just disconnected with, it fails to send a new invitation to the client. I am not sure what is the correct way to disconnect with connected peers, and how to disconnect with all connected peers if the app is getting killed due to in suspended mode. Can anyone help me with this one please?
For example:
If I have A and B connected, and B walked out of range, the session is automatically disconnected due to out of reachability and
- (void)session:(MCSession *)session peer:(MCPeerID *)peerID didChangeState:(MCSessionState)state {
case MCSessionStateNotConnected:
}
is invoked, I believe at this point both parties know they have disconnected from each other, however, when B walks back and wants to reconnect -- the invitation is sent but the other one never received it. What exactly went on? Do I have to manually disconnect the session to prevent this?