How to connect manually using Multipeer Connectivity (swift)

时间:2015-11-12 11:55:09

标签: swift multipeer-connectivity

Im creating P2P chat iOS application (swift).

I want to save the peer obj which have connected once to userDefault and connect without inviting when connecting the peer next time.

I think using the func

session.connectPeer(peerID: MCPeerID, withNearbyConnectionData: NSData) 

is solve my requirement, however I cant understand how to use this method, especially withNearbyConnectionData arg.

0 个答案:

没有答案