MultipeerKit icon indicating copy to clipboard operation
MultipeerKit copied to clipboard

[Bug] Nearby users duplicated

Open pawisoon opened this issue 3 years ago • 1 comments

When running example code on 2 physical devices, and leaving the app for a moment to background and re-entering it, the list of nearby users contains 2 of the same users.

IMG_0053

pawisoon avatar Jan 14 '23 23:01 pawisoon

The devices are duplicated because Multipeer Connectivity cannot function while the application is in the background. To address this, all MCSession instances and peers should be disconnected and torn down when the app is backgrounded

AbdAlAlii avatar May 20 '24 18:05 AbdAlAlii