Gamekit Picking more tha two players using gkpeerpickercontroller

254 Views Asked by At

Can anybody tell how to connect more than two online peers in iphone using gkpeerpicercontroller.

I tried to connect using picker.connectionTypesMask =GKPeerPickerConnectionTypeOnline | GKPeerPickerConnectionTypeNearby;

but when i select two phones icon it is searching for wifi connection. but when i select the net icon there is nothing happens how an i select peers who are online and ready to play game.

Thanks in advance

1

There are 1 best solutions below

0
zebra On

You can't with GKPeekerController, you must implement the connection and if you want show a custom alert view

curSes = [[GKSession alloc] initWithSessionID:@"XXX" displayName:nil sessionMode:GKSessionModePeer];
curSes.available = YES;
curSes.delegate = self;
curSes.disconnectTimeout = 1;
[curSes setDataReceiveHandler: self withContext:nil];