Johnykutty
Johnykutty

Reputation: 12859

Gamekit Picking more tha two players using gkpeerpickercontroller

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

Upvotes: 1

Views: 252

Answers (1)

zebra
zebra

Reputation: 435

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];

Upvotes: 0

Related Questions