Ajayvictor007
Ajayvictor007

Reputation: 327

how can i connect to multiple peers using GKPeerPickerController object

i have used GKPeerPickerController to connect to iPhoes via bluetooth.Now when my application launches,i am able to search the iPhones nearby but when i select any one of them,it starts connecting to that iPhone.Now when they are connected,I have dismissed picker.My problem is that how will i connect to rest of iPhones.how can i make picker to listen to any request that is coming in between the running application.

I tried to create another object of picker which will keep listening the request but it will not be shown to user untill any request comes.But i found that picker can not detect untill it is shown.Correct me if i am wrong and suggest me something regarding this.

thanks

Upvotes: 2

Views: 295

Answers (2)

Pisci
Pisci

Reputation: 21

You can use GKSession to detect devices and connect them. GKPeerPickerController just helps you connect two devices,which as jkap said!

Upvotes: 2

jkap
jkap

Reputation: 5222

I don't think you can connect multiples using GKPeerPickerController. You would have to design and code your own view controller to be able to connect more than one, as PeerPickerController seems to be specifically designed to only connect two devices together.

Upvotes: 0

Related Questions