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
1
vote
1 answer

How do I send an array of integers via GKSession bluetooth

I have a problem with sending an array of integers via GKSession. This is how I did it: To send it. -(void)sendData { NSMutableArray *myArray = [[NSMutableArray alloc] init]; [myArray addObject:[NSNumber…
Arbitur
  • 38,684
  • 22
  • 91
  • 128
1
vote
1 answer

GKSession disconnects with more than 2 devices

We are using GKSession to setup a game. This works great with 2 devices, with one device being setup with GKSessionModeServer and the other GKSessionModeClient. However, as soon as we have 2 or more clients (3 devices; 1 host and 2 clients) one of…
Gorm Lai
  • 46
  • 1
  • 3
1
vote
2 answers

GameKit client/server issues with more than 3 clients

I am currently building an iOS application that allows users to share content with friends using GameKit. One device becomes the Sever and they can then send things to the connected peers. This is working well up until 4 connected clients. The 4th…
bencallis
  • 3,478
  • 4
  • 32
  • 58
1
vote
0 answers

Is it harmful if every peer connects with every other peer bidirectionally?

I'm using GKSession in the Peer mode where an instance of the app is both a server and client. I connect to other peers like this: - (void)session:(GKSession *)session peer:(NSString *)peerID didChangeState:(GKPeerConnectionState)state { …
openfrog
  • 40,201
  • 65
  • 225
  • 373
1
vote
1 answer

can AVAssetReader be used to stream audio data over bluetooth/wifi?

According to AVAssetReader documentation AVAssetReader is not intended for use with real-time sources, and its performance is not guaranteed for real-time operations. Yet I see examples of it working with the audio queue services.. which is real…
abbood
  • 23,101
  • 16
  • 132
  • 246
1
vote
1 answer

How to transfer data between phones over GKSession without using GKPeerPicker

I'm trying to create an app that transfers data between 2+ phones using GKSession. Thing is there are two options: First: using the GKPeerPicker.. However here I get stuck at the point where I have to implement my own WIFI interface.. apple provides…
abbood
  • 23,101
  • 16
  • 132
  • 246
1
vote
1 answer

GKSession: Sending an Array of Strings

I'd like one peer in a session to send an array of strings to another, connected peer. Is there a way to convert such an array into NSData or do I need to send the strings one after another? Thanks very much.
saeppi
  • 259
  • 4
  • 16
1
vote
1 answer

NSString into NSMutableData without conversion to NSData

my problem is the following. I would like to encapsulate a NSString in a NSMutableData object. But I would like to do it together with other items and without first encapsulating it into a NSData. It's only bytes after all isn't it? My final…
ticofab
  • 7,551
  • 13
  • 49
  • 90
1
vote
1 answer

iOS gamekit, card game players, & GKVoiceChatService

I'm working on a card game for iOS. I'm thinking game center integration is something I want to be leaning towards, but in terms of a card game, I'm not exactly sure what that would entail for the individual players. From the Apple class reference,…
Slayer0248
  • 1,231
  • 3
  • 15
  • 26
1
vote
1 answer

GKSession - Switching between apps and maintaining the session

I have a GKSession between two apps. One is the server, the other the client. The server causes the client app to launch another app with a urlscheme command. What I WISH would happen is that when the client app shuts down, the session ends, the…
Andy
  • 38
  • 4
0
votes
2 answers

Both as a client and a server with GKSession

Can I implement two GKSession, one as a client and the other as a server at the same time? Is there a problem or any limitation to implement this connection with WiFi and Bluetooth? Thanks!
shiami
  • 7,174
  • 16
  • 53
  • 68
0
votes
1 answer

iPhone peer 2 peer Connection .. Is there a way to connect to more than 1 devices?

I am try to implement peer to peer Connection Application . So i want to Connect More than 2 devices to each other.How to Create separate session for Each pair of devices Is it possible to connect to more than 1 devices using the new GameKit…
Musthafa P P
  • 645
  • 3
  • 7
  • 21
0
votes
1 answer

Is it possible to have two instances of GKSession on the same device when using Bluetooth?

I am writing mutliplayer game and thought I would create two instances of GKSession. One session set to GKSessionModeServer and the other to GKSessionModeClient. The server is properly reported when I call peersWithConnectionState: on the client…
0
votes
1 answer

can we connect iPad2 and iTouch using Gamekit?

I have this doubt, can we connect iPad2 and iTouch using Gamekit ? I tried Apples GKTank example along with several others available tutorials regarding the same. But I did not have successful connection between them. Anyone knows why this happened…
slonkar
  • 4,055
  • 8
  • 39
  • 63
0
votes
1 answer

iPhone bluetooth paired devices after app is not running?

Like in android, we can pair devices and even after restarting the app or device, these devices are in paired list, so it is possible same as in iPhone?
Chatar Veer Suthar
  • 15,541
  • 26
  • 90
  • 154