I want to find out the type of the data that i am sending through a send function through gamekit. Basically i am storing that data in CFPropertyListRef. dataReceived is of type NSMutatableData.
- (void) receiveData:(NSMutableData *)data fromPeer:(NSString *)peer inSession: (GKSession *)session context:(void *)context {
// Read the bytes in data and perform an application-specific action.
[dataReceived setData:data];
if([dataReceived length]> 0 ) {
CFStringRef errorString;
CFPropertyListRef plist = CFPropertyListCreateFromXMLData(kCFAllocatorDefault, (CFDataRef)dataReceived, kCFPropertyListMutableContainers, &errorString);
}
My goal is to find out if plist is of type NSDictionary, since i would like to handle that data appropriately