I have an app where a peer to peer network is created. There is a leader and members. If a member leaves, it just disconnects itself with session.disconnect()
. But if the leader leaves, I want all the other members to get disconnected from each other as well.
Disconnect individual peers from MCSession?
I've seen this post for an Objective-C solution to disconnecting other peers, but didn't understand it. Can someone give me a good way to disconnect all peers of the session.connectedPeers
at once?