I am using Apple MultipeerConnectivity framework and I am able to send the message to all the peers connected to it.
I am using:
- (BOOL)sendData:(NSData *)data toPeers:(NSArray *)peerIDs withMode:(MCSessionSendDataMode)mode error:(NSError **)error;
I am even able to send the image by converting it in NSData
.
Problem is I am trying to send image and text together to other peers. I know there are three ways to send information to other peers:
1. NSData
2. Resource
3. Stream
So for sending an image and text together which method we should use and how?
Thanks