i am developing an application in which i will be sending a string to peer(after converting it into NSData object) and also an UIImage again by converting into NSData object.
Now at receiving end i have a receive method
- (void) receiveData:(NSData *)data
fromPeer:(NSString *)peer
inSession:(GKSession *)session
context:(void *)context
My problem is that,same receive method is called every time i send any data,and i have to use image and text data differently.
So how can i know,whether i data that i have received is a NSString object converted into NSData or it's UIImage data converted into NSData.
please help me.