Multipeer Connectivity: Peer browser doesn't always notice gone Peers

Originator:jiayong.ou
Number:rdar://17574895 Date Originated:07-Jul-2014 05:47 PM
Status:Open Resolved:
Product:iOS SDK Product Version:
Classification: Reproducible:
 
Summary:
`-[MCNearbyServiceBrowserDelegate browser:lostPeer:]` doesn't always get called when a peer is gone. This happens sometimes on actual devices, but almost always in the simulator.

Steps to Reproduce:
The MultipeerChat example project (https://developer.apple.com/library/ios/samplecode/MultipeerGroupChat/Introduction/Intro.html) can be used to reproduce this:

1. Run project on a Simulator and a real device
2. Enter same room name on both devices
3. Tap on the peer browser button
4. Wait until the devices see each other
5. Turn on airplane mode on the real device

Expected Results:
Device disappears from the peer browser

Actual Results:
Device stays in the peer browser indefinitely

Version:
iOS 7.1.2

Notes:


Configuration:
iPhone Simulator (iOS 7, Xcode 5), iPad mini retina

Comments

Added Feedback to Apple

I just tested it with iOS 8 beta 5 and the issue is still there. I managed to reproduce it with two real devices with the attached project. Additionally, there is a video showing the problem in action attached.

The test project uses MCBrowserViewController but I guess that also is a MCNearbyServiceBrowserDelegate. As you can see on the video, the peer stays in the peer selection after I turned off Wi-Fi.

I also tested with leaving the Wi-Fi off longer but it still does not disappear from the list of nearby peers after half an hour.

By jiayong.ou at Aug. 5, 2014, 2:19 p.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!