I play with the Game Kit API and I have a very simple block of code that never returns, even with an error ...
GKLeaderboard *pointsRequest = [[GKLeaderboard alloc] initWithPlayerIDs:[match playerIDs]];
if (pointsRequest != nil)
{
[pointsRequest setCategory:kPOINTS_LEADERBOARD_ID];
[pointsRequest loadScoresWithCompletionHandler: ^(NSArray *scores, NSError *error)
{
if (error != nil)
{
NSLog(@"%@", [error localizedDescription]);
}
if (scores != nil)
{
.
.
.
Since there is no error, I do not know how to solve this. Does anyone have any ideas what is wrong or how can I further investigate what is wrong?
Thank you very much for your wisdom!
UPDATE: Finally, I was able to return this block of code, so I do not quite understand why. To return it, I sent an invoice to the leaderboard shortly before trying to get it. It’s strange that I had an account before, so I don’t know why the publication of the assessment affected this problem.
source
share