Questions tagged [gkgamesession]

Apple's GKGameSession class supports both real-time and turn-based game sessions, using a combination of iCloud storage and real-time messaging. Up to 100 players can join a session, and up to 16 can simultaneously monitor a real-time messaging stream. (GKGameSession has been deprecated by Apple, and should no longer be used as of iOS 13 and macOS 10.15.)

9 questions
3
votes
2 answers

iMessaged-based invitations for GameCenter for iOS 10

I'm trying to update my app to work correctly with the new features of GameCenter in iOS10. I create a new GKGameSession on device1, get a share URL, and all that works fine. I send the share URL out via a share sheet to device 2. Device2 clicks…
Shaun Budhram
  • 3,690
  • 4
  • 30
  • 41
3
votes
0 answers

How to customize GKGameSession message notifications?

I can't figure out how to customize GKGameSession message notifications, if it's even possible. The default notifications do include a snippet of text that I supply when sending the message, but the result is awkwardly worded, uses the Game Center…
Kevin Packard
  • 374
  • 4
  • 13
1
vote
1 answer

Auto MatchMaking with GKGameSession

I'd like to switch to GKGameSession (instead of the legacy GameCenter), but my app does a lot of auto-matchmaking. How do I do that with Sessions? Is it possible to create a game using the traditional MatchMaker View Controller, but then pass…
1
vote
0 answers

GKGameSession not working with specific account

I'm trying to make a simple app using GameKit's GKGameSession released with iOS 10. For the most part everything works fine, however with one of my test accounts I can create a session using GKGameSession.createSessionInContainer:, but fetching…
Andy Heard
  • 1,715
  • 1
  • 15
  • 25
1
vote
2 answers

GKGameSession- saveData always fails with malloc error after getShareURLWithCompletionHandler

I'm trying to incorporate GKGameSession into my Game Center game. I've tried several combinations of the following code: running the commands asynchronously, chaining them in the completion handlers, etc. Every time I see the same result: I can use…
Thunk
  • 4,099
  • 7
  • 28
  • 47
1
vote
1 answer

Get GKPlayer.playerID from GKCloudPlayer.playerID

I want to use new class GKGameSession in my iOS 10 multiplayer game. I need to get the playerID of all users from Game Center to check compatibility with previous versions of my game. But GKPlayer.playerID != GKCloudPlayer.playerID How can I get…
Andrey Tozik
  • 115
  • 7
1
vote
4 answers

createSession in GKGameSession is only returning nil

I'm trying to start a new GKGameSession and when I use createSession, all I can get so far is nil. Here's my code: GKGameSession.createSession(inContainer: "test", withTitle: "MyGame", maxConnectedPlayers: 8) { (newGameSession, error) in …
Bryan Cimo
  • 1,268
  • 1
  • 19
  • 34
0
votes
1 answer

GameKit, GKGameSession how to add players to the session and send data?

I created a session, shared it to another player and now I want to start a game. I can see a session with two players on both devices. So, it looks like we're ready to game but I need to change connected status before the game and I can do this on…
Dima Deplov
  • 3,688
  • 7
  • 45
  • 77
0
votes
1 answer

How do I programmatically retrieve the icloud container name?

To create a GKGameSession I need to pass in the iCloud container name. + (void)createSessionInContainer:(NSString *)containerName withTitle:(NSString *)title maxConnectedPlayers:(NSInteger)maxPlayers …
Thunk
  • 4,099
  • 7
  • 28
  • 47