Questions tagged [gamekit]

GameKit is an Apple Framework that provides classes to create social games.

The Game Kit framework provides three distinct technologies: Game Center, Peer-to-Peer Connectivity, and In-Game Voice. You can adopt each technology in your application independently of the other technologies.

See : http://developer.apple.com/library/ios/#DOCUMENTATION/NetworkingInternet/Conceptual/GameKit_Guide/Introduction/Introduction.html

867 questions
7
votes
1 answer

inviteHandler never called

I'm adding online two player to a game using Game Kit. My test devices are a 3rd gen iPod touch running 4.3.5 and a 2nd gen iPod touch running 4.2.1. Game Center notifications are turned on on both devices. I am not using the iPhone Simulator. Both…
Shaun Inman
  • 1,968
  • 1
  • 19
  • 28
7
votes
1 answer

iOS: Game center crash on simulator

This is driving me crazy, I just can't find out the problem: I have a crash on game center on simulator, in the device it works perfect. It crashes when I call the following code: [[GKLocalPlayer localPlayer]…
Damian
  • 5,471
  • 11
  • 56
  • 89
7
votes
4 answers

Difference between GameViewController and SKScenes

I've been developing a game using SpriteKit and Swift but I seem to be having trouble determining what the real differences are between the GameViewController and any one of my SKScenes. I'm trying to understand the differences because I want to…
7
votes
3 answers

Authenticating GKLocalPlayer with Game Center

I am trying to authenticate a GKLocalPlayer with Game Center. However, the code supplied by Apple - (void) authenticateLocalPlayer { [[GKLocalPlayer localPlayer] authenticateWithCompletionHandler:^(NSError *error) { if (error == nil) …
Joseph Tura
  • 6,290
  • 8
  • 47
  • 73
7
votes
1 answer

GKLocalPlayerListener protocol is not called

As the apple guidelines said; I've implemented the GKLocalPlayerListener protocol in my game center class and add the local player as listener as soon as he's authenticated: func authenticationChanged() { if…
Max_Power89
  • 1,710
  • 1
  • 21
  • 38
7
votes
1 answer

In iOS, is Gamekitframework faster than multipeerconnectivity framework in sending messages?

Using both the frameworks, we can send messages to session.peers using Bluetooth? I am using multipeerconnectivity framework to send messages to my peers, but it usually has a delay of 1.4 sec between sending a message and receiving.
Nandakumar R
  • 1,404
  • 11
  • 17
7
votes
2 answers

Posting score to Game Center leaderboards

I am creating a game using swift on apple's Xcode 6 beta 6, and trying to add the high score of my game to gamecenter leader boards. I have created the leader boards in gamecenter. So, how do I add my high score, which I saved as a NSUserDefault,…
7
votes
3 answers

How to get local player score from Game Center

How to get score of local player from Leaderboard Game Center? I tried this code, but it returns nothing. Anybody know how to solve it, or is there better way how to get score? - (NSString*) getScore: (NSString*) leaderboardID { __block NSString…
user2374693
  • 163
  • 1
  • 2
  • 10
7
votes
2 answers

How to deal with game center invitations, if the friend has not progressed far enough in the app to reach the installInvitationHandler method?

I'm creating a real time matches game and I'm confused as to how to deal with game invitations? For instance, a player on one device can invite his friends to a match and then an invitation banner will appear on the friends' devices. They can tap…
Nosrettap
  • 10,940
  • 23
  • 85
  • 140
7
votes
1 answer

The peerID used in GameKit framework, is always unique for each device?

The peerID assigned to your device in a GKSession, is it always the same for the same device? I mean, every time you create a GKSession, your peerID will be the same one? or a random one is assigned everytime you create a GKSession? How is this…
nico
  • 9,668
  • 8
  • 26
  • 28
6
votes
2 answers

Sending And Receiving Data Via Game Center (GameKit) Over 3G Stops Working

I have a Game Center matchmaker working and implemented, and by using Game Kit's Bluetooth functionality I know that my multiplayer code works. When playing over the internet through the Game Center sandbox, it works when both devices are on WiFi,…
jrtc27
  • 8,496
  • 3
  • 36
  • 68
6
votes
2 answers

Game Kit Peer to Peer

I coded a bomberman application that uses a gamekit peer to peer connection. The problem is that after a while the game isn't in sync anymore. I looked at the sample code for GKTanks and used their model. There is no client/server relation between…
silviupop
  • 638
  • 7
  • 14
6
votes
1 answer

Modifying mutable object in completion handler

I have a question about thread safety of the following code example from Apple (from GameKit programming guide) This is to load achievements from game center and save it locally: Step 1) Add a mutable dictionary property to your class that report…
Sean S Lee
  • 1,274
  • 9
  • 24
6
votes
1 answer

How to share saved games across devices?

I implemented GameKit into my iOS game including the saved game feature. Here an example how I save and load a game: MobSvcSavedGameData.h #ifndef MOBSVC_SAVEDGAMEDATA_H #define MOBSVC_SAVEDGAMEDATA_H #import @interface…
Martin Braun
  • 10,906
  • 9
  • 64
  • 105
6
votes
3 answers

iOS Development: When receiving a Game Center invite, how do I obtain the GKMatch object?

I'm building an iPhone game that uses Game Center and I'm having a hard time understanding how to start a match game that was started by receiving an invitation to play from a friend. The docs say this... The acceptedInvite parameter is non-nil…
BeachRunnerFred
  • 18,070
  • 35
  • 139
  • 238