Questions tagged [gksession]

Used to discover nearby iOS Devices using Bluetooth or Wifi

GKSession is GameKit Framework, it is mainly used to find nearby iOS Devices using Bluetooth or Wifi. It is primarily work with Peers, which discovers the other Device using unique ID called sessionId. GKSession either work as Peer to Peer connection or Client Server connection.

88 questions
2
votes
1 answer

Gamekit Latency

I have the following problem with GKSessions: Sometimes there is a huge delay when sending data (3-4 seconds sometimes up to 10 seconds) in a client/server application. If the server sends let's say 10 packets during the delay, those 10 packets are…
silviupop
  • 638
  • 7
  • 14
2
votes
1 answer

GKSession: not visible after suspending the App

I am working around for a while with GameKit. Almost everything works fine. I have a major Problem with the session:peer:didChangeState: Method not beeing called after resuming. In the Apple example GKRocket the session is destroyed if the app…
scrat84
  • 185
  • 1
  • 8
2
votes
2 answers

Issue with the GKSession . Cant identify the available devices

Hi All I am using the following code to identify the available devices on bluetooth. _session = [[GKSession alloc]initWithSessionID:sessionid displayName:sessionid sessionMode:GKSessionModePeer]; _session.delegate = self; [_session…
Bharat Jagtap
  • 1,692
  • 2
  • 22
  • 35
2
votes
1 answer

GKSession over WiFi disconnects when router rotates security keys

This issue is baffling to me. I am using GKSession over WiFi in a host-client spoke configuration for my app. But for some reason, whenever the router rotates its security keys, the devices all get disconnected from each other. I have tested…
EmphaticArmPump
  • 774
  • 4
  • 7
  • 23
2
votes
1 answer

GKSession alloc / release / alloc = leaks and crashes

I've got an app that throws out the GKSession and makes a new one under various conditions (connection timeout, session fails, etc.). I'm getting memory leaks, though, and it sometimes crashes after a few loops through the reconnect. Here's my…
Michael F
  • 321
  • 3
  • 13
2
votes
1 answer

Duplicate peer name appear in GKPeerPicker Controller

I am getting duplicate peername if I connect and disconnect bluetooth multiple time in my both ios device. Is there any way to get single name for unique peer in gkpeerpickercontroller for bluetooth chat application. Also attached the screenshot…
Vijay Hirpara
  • 555
  • 3
  • 12
2
votes
0 answers

GKSession receiveData: fromPeer: inSession: context: delay in receiving data

I have created a timer app which used to run timer on multiple device if timer is stop on one device it has to reflect on the other device as well, i am using this delegate - (void) receiveData:(NSData *)data fromPeer:(NSString *)peer …
sKhan
  • 9,694
  • 16
  • 55
  • 53
2
votes
1 answer

How do I correctly setup a GKSession (Bluetooth) on iOS 6.1

I am having an issue with getting a GKSession to work. Below is my code that is executed when a specific button is pressed. GKSession *session; if (connectButtonHasBeenPressed == false) { NSLog(@"connectToBluetoothDevice has been called"); …
Andrew
  • 15,357
  • 6
  • 66
  • 101
2
votes
0 answers

GKSession reconnect after App Suspends on Simulator but not on actual device

I have an app that does local networking using a GKSession running in GKSessionModeServer mode. This is limited so that only two devices will ever connect when using this app. All of the connection and communication code works exactly as expected…
Marryat
  • 535
  • 3
  • 11
2
votes
2 answers

Are there more reliable alternatives to GKSession which allow P2P between more than 3 devices?

Some people pointed out that Bonjour is more reliable. Bonjour only is WiFi and does not support Bluetooth, no? There must be an alternative to GKSession which just combines all the good things of Bonjour and Bluetooth in one simple to use API but I…
openfrog
  • 40,201
  • 65
  • 225
  • 373
2
votes
1 answer

How to get precise clock synchronisation when doing peer to peer with GKSession?

I made a simple game which connects to other peers using GKSession from GameKit. It was easy to set up but I discovered some problems: Latency varies a lot. Sometimes message arrives instantly on other devices. Sometimes latency is > 1 second for…
openfrog
  • 40,201
  • 65
  • 225
  • 373
2
votes
1 answer

How to avoid GKSession disconnection in client-server when in background

I've a problem working with GameKit and GKSession operations. I'm trying to implement a GKSession client-server iOS app system (ServerApp, ClientApp) having this behavior: ServerApp creates a GKSession in GKSessionModeServer mode (Bluetooth…
alegiac
  • 33
  • 6
2
votes
0 answers

GameKit WiFi works on a simulator but not on a device

I have faced an unexplainable problem while working with GameKit. When establishing connection over WiFi (picker.connectionTypesMask = GKPeerPickerConnectionTypeOnline;) devices cannot see each other. they see nothing while simulator sees…
Andrey Chernukha
  • 21,488
  • 17
  • 97
  • 161
1
vote
1 answer

GKSession - kill and renew session

In order to read a new display name of a peer I need to kill and renew the GKSession. Setting it to nil and initiate it anew does not work. In the code below, the NSLog in the for-loop to show the available peers is not called (there's no error…
saeppi
  • 259
  • 4
  • 16
1
vote
1 answer

How to implement Master-Client model using GKSession?

I am working with GKSession right now. I want to connect more than 2 iPads with each other. I am able to connect two of them using Bluetooth GKSession PeerPickerController. I am pretty much new to this stuff. Can any one give me some pointers or…
slonkar
  • 4,055
  • 8
  • 39
  • 63