Hope "Quinn the Eskimo" is lurking about this holiday season....
My app has been using MPC for the past year - it operates in a client / server fashion. Up until now, the number of clients connecting to the server has been around 8 or less. Things have been running OK.
Recently a customer installed 12 devices and all of a sudden, I'm getting instability issues (similar to https://forums.developer.apple.com/message/95870#95870). By instability I mean, my app is going offline because it is receiving what appears to be random invitations. I have successfully reproduced the problem in the office, but I cannot for the life of me solve it (yet).
The symptom is that that the server (who is the advertiser) receives a seemingly random invitation from a peer who is already connected and in a session with the server. In fact the client (browser), once it establishes a session with the host, discontinues the browser ([_serviceBrowser stopBrowsingForPeers];) and clears the _servicebrowser instance (ie: set to nil)
In the production version of the code, I create a single peerID for the server, and then create a new session for each peer when the invitation comes through. In the re-write I did, I started and stopped the advertiser after each client connected and started the advertiser with a new PeerID - again keeping to the principle of one client per session, but this doesn't appear to have helped.
Right now, I'm at a bit of a loss and in desperate need of a fix, so I can pay my x-mas bills 🙂
Happy to send code/logs to anyone who might be able to help
Some further notes:
- using the simulator is a waste of time as its not reliable for this sort of troubleshooting. I have borrowed 20 real ipads for the testing and have only used 12 before things got too unstable
- I setup a wi-fi network which is dedciated to the the testing
- all bluetooth is disabled
- all devices (expect 1) are iPad Air's
- all OS's are 9.2 and xCode 7.2