1

I am using gamekit framework in my project for connecting two or more devices. I want to ask when one device selects another device like say device A and B , When A selects B ,B gots a dialog reagarding accept or deny connection.Now B accept then, what I have to do is I have to send data to both devices, from B to A and from A to B.

For this what I did is:-

- (void)session:(GKSession *)session peer:(NSString *)peerID didChangeState:(GKPeerConnectionState)state{

    switch (state)
    {
        case GKPeerStateConnected:
        {
            [mPeers addObject:peerID];
            [self sendFavoriteAppData];//called my method
}
}
}

The problem is when I use one iPad and another iPhone then in this case , the method is getting called on the device A but on device B which gets the dialog and press the accept button , this method does not gets called.

If I use both iPad then in this case it is working fine.

Please help me as I am stuck here. Any help would be highly appreciated!

Gypsa
  • 11,230
  • 6
  • 44
  • 82

0 Answers0