ios - Multipeer Connectivity :List all nearby sessions -
i'am working on multipeer connectivity in ios 7 , working nice.but need is,when press search button need display nearby sessions(not nearby devices).is there possible solution this. please help!!!
you don't why want pass mcsession
objects between peers, 1 time have 2 connected peers, can pass object conforms nscoding
protocol between peers using 1 of mcsession info sending methods such
- (bool)senddata:(nsdata *)data topeers:(nsarray *)peerids withmode:(mcsessionsenddatamode)mode error:(nserror **)error
however mcsession doesn't conform nscoding, you'd improve off sending metadata mcsession between peers. if peer , peer b connected, , peer wanted know other peers peer b connected to, peer b send array of nsstring
objects listing displayname
of each peer.
but if did that, if peer hasn't discovered (or been discovered by) peer b's connected peers, you're not going able communicate them anyway. fact you're looking ways send mcsession
objects between peers means there's improve way tackle you're trying achieve.
tl;dr
mcsession
handles connections between peers. peers need connected share mcsession objects in first place.
ios session multipeer-connectivity
No comments:
Post a Comment