I am developing multiplayer game using game centre, Overall Code is working well if my both device is 64bit or 32bit, but if my one device is 32bit and other is 64bit than sending data is not correct, please help me,
thanks in Advance
- (void)sendDataToPlayers:(void *)data length:(NSInteger)length
{ NSError *error = nil;
NSLog(@"lenth %i",(int)data);
NSData *package = [NSData dataWithBytes:data length:length];
[self.currentMatch sendDataToAllPlayers:package withDataMode:GKMatchSendDataReliable error:&error];
[self setLastError:error];
} - (void)match:(GKMatch *)match didReceiveData:(NSData *)data fromPlayer:(NSString *)playerID {
[self.transportDataDelegate onReceivedData:data fromPlayer:playerID];
}
long
for example (or anythingtypedef
d tolong
). - trojanfoeint8_t
,uint32_t
, etc. for the data you exchange, and then you will be OK. - trojanfoe