The inner workings and use of Apple's GameCenter API in your apps.
Questions tagged [game-center]
1852 questions
0
votes
2 answers
How do I send data from a GKPlayer to another in a match?
I would like to send NSData from a GKPlayer to another in a match. Therefore, the method sendDataToAllPlayers(_:withDataMode:error:) would be the most ideal.
func sendDataToAllPlayers(data: Int,
withDataMode Reliable: GKMatchSendDataMode,
…

Cesare
- 9,139
- 16
- 78
- 130
0
votes
1 answer
GameCenter: endTurnWithNextParticipants not advancing
In the sandbox environment, I'm having trouble advancing a turnbased match to the next player.
Initial conditions:
Player A and Player B on Device A and Device B, respectively.
Both logged into the sandbox
Both players can see each other's GC…

Thunk
- 4,099
- 7
- 28
- 47
0
votes
2 answers
Several Leaderbords in sandbox mode
I have created 4 leaderboards for my app. One of them is default.
I am using 3 different sandbox users. Scores are uploaded without errors. But there is a strange issue. Only default leaderboard contains all 3 scores from 3 users. Others contain 1…

mres
- 143
- 2
- 9
0
votes
2 answers
While am I getting an error while setting up GKMatchmakerViewControllerDelegate in Swift?
I would like like to set up the matchmaking viewController of my game. To do so, I add the GKMatchmakerViewControllerDelegate delegate to my main UIViewController called Home, so that it looks like:
class Home: UIViewController,…

Cesare
- 9,139
- 16
- 78
- 130
0
votes
1 answer
don't know what I have to do to add Game Center leaderboard
I tried to add a Game Center leaderboard, first setting it on iTunes Connect but when I have to write the code in Xcode I don't know what I have to do. I want to open the leaderboard with a shake gesture and for that I will use this code in the…

Facundo Schiavoni
- 65
- 7
0
votes
2 answers
reporting (small) achievements, then loading them returns none
I am reporting several GKAchievements with reportAchievements:withCompletionHandler: to Game Server and receive no errors.
However, when I request them immediately afterwards with loadAchievementsWithCompletionHandler: I receive an empty array of…

Drux
- 11,992
- 13
- 66
- 116
0
votes
0 answers
Missing Game Center Localisation choice for Irish language
I wish to use Game center with my ios app but the app is written in Irish. On Apple's documentation it states that you can choose a language for Game center but unfortunately the list of languages is very limited and does not include Irish.
How…

Linda Keating
- 2,215
- 7
- 31
- 63
0
votes
1 answer
Not finding players on Game Center. Am I testing my game wrong?
I have the game running on the Xcode simulator and also my iPhone. When I hit search they are both put into separate games, instead of one player joining the existing one. It is a turn based game, a player can take their first turn while Game Center…

George
- 322
- 1
- 6
- 25
0
votes
1 answer
NSURLErrorDomain code=-1005 from GKLeaderboard loadScoresWithCompletionHandler:
I am receiving the following error in a callback to loadScoresWithCompletionHandler:
Error Domain=NSURLErrorDomain Code=-1005
"The operation couldn’t be completed. (NSURLErrorDomain error -1005.)"
Other calls to Game Center both before and…

Drux
- 11,992
- 13
- 66
- 116
0
votes
0 answers
Game Center Unavailable Alert View not showing anymore?
In my previous SpriteKit games, when the player accesses the game center view controller, he/she is presented with an alert view saying "Game Center Unavailable. Player is not signed in" if he/she is not signed in to Game Center. This alert view…

aresz
- 2,589
- 6
- 34
- 51
0
votes
1 answer
Game Center GKLeaderboard initializer failable?
I'm working on Game Center now. In Apple's Game Center Programming Guide (Listing 4-11), there is example code to retrieve the top scores of a leaderboard:
GKLeaderboard *leaderboardRequest = [[GKLeaderboard alloc] init];
if (leaderboardRequest !=…

zavié
- 4,301
- 2
- 34
- 46
0
votes
1 answer
How to present data provided by asynchronous call on UI in Swift?
I have manage to scrape up the following code to my GameCenterHelper-class. However I'm completely lost with Swift's blocks and completionHandlers. Could someone post a code example how to access the data provided by the asyncronous…

user3673836
- 591
- 1
- 9
- 23
0
votes
1 answer
Maximum number of outstanding loadLeaderboardsWithCompletionHandler: from a single iOS client?
I am trying to fill a table that shows leaderboard sets along with their titles and numbers of contained leaderboards. (Similar to what the Game Center app also does.)
In order to fill the table, I send off many…

Drux
- 11,992
- 13
- 66
- 116
0
votes
0 answers
Make a JTextArea appear in my game view
I am developing a simple game where have to write words. So I taught to make a TextArea where the words typed goes, to this I need a scroll to can see all words. But i have a render method that have this:
public void onRender(Graphics2D g) {
…

user1258260
- 13
- 5
0
votes
0 answers
Game Center Leaderboard scores delayed and wrong time
I'm currently testing various sandbox accounts for Game Center. I only use leaderboards from Game Center in my app. If I get a new high score, that new scores doesn't appear as soon as I go to look at leaderboards, it appears a few seconds and…

Bergy
- 81
- 1
- 5