2

I have started using the multipeer connectivity framework and have successfully setup a connection between an iPad Air and iPad Mini Retina. This was great, however the next step for me was to use a singleton to effectively save the connection between the two devices so that constant reconnection every view controller change was achieved. The problem is that when I am saving the MCSession and Peer ID, it decides itself to randomly disconnect before I have the opportunity to send anything. I have heard that this framework is having a few problems with disconnects however i was just wondering whether anybody has successfully achieved using this framework with singletons?

Kind regards, Ryan King

  • Doubt if the singleton itself is the problem. Have you looked at http://stackoverflow.com/questions/18935288/why-does-my-mcsession-peer-disconnect-randomly ? – ChrisH Jan 08 '14 at 18:38
  • I have looked at that thread and implemented the required session method for the certificate however when the view controller passes the session to the singleton all connected peers in the array are lost. Have you successfully got a singleton to work for this framework? – user3171773 Jan 11 '14 at 02:18
  • Which object is the MCSession's delegate? Is it one of your view controllers, which might get deallocated? – Pascal Bourque Jan 21 '14 at 16:28

0 Answers0