Multipeer connectivity framework: Stability and Recommendations
<p>I'm working on a project that uses MC framework as a communication channel, and after some tests I have the perception that this channel is somehow unstable to rely on.</p>

<p>I've been following Apple's documentations and videos in order to use the framework properly, but happens that:</p>

<ul>
<li>peers get disconnected kinda' often after paired, and even more ofter if I pair more than one peer.</li>
<li>some data packages have mixed data</li>
</ul>

<p>Is there any kind of recommendation to work with the framework?
i.e: </p>

<ul>
<li>Specific project settings? (i.e: is there something in the capabilities section that needs to be enabled?)</li>
<li>Multithreading restrictions? (i.e: always call mc methods from the same thread)</li>
<li>Restrictions in terms of the amount of data to be sent?</li>
</ul>

<p>I found <a href="https://stackoverflow.com/questions/19101838/multipeer-connectivity-disconnect">this</a> link that mentions something about the framework not performing ok under stress. That's the kind of advice I'm looking for :).</p>

<p>For the record:</p>

<ul>
<li>I'm using an implementation based on <a href="http://nshipster.com/multipeer-connectivity/" rel="nofollow noreferrer">this</a> post since <a href="https://developer.apple.com/library/ios/samplecode/MultipeerGroupChat/Introduction/Intro.html#//apple_ref/doc/uid/DTS40013691" rel="nofollow noreferrer">Apple's project</a> is not working for me.</li>
<li>I'm using only one <code>MCSession</code> for all peers I try to pair with</li>
<li>Encryption preference is set to <code>MCEncryptionNone</code></li>
<li>Using <code>sendData:</code> and <code>sendResourceAtURL:</code> to communicate with peers.</li>
</ul>