मैं अपने ऐप के लिए गेम सेंटर लीडरबोर्ड बनाने की कोशिश कर रहा हूं। मैं ऐप्पल के चरणों का पालन कर रहा हूं और जीकेटापर से नमूना कोड का पालन कर रहा हूं, लेकिन मुझे गेम सेंटर में दिखाने के लिए कोई स्कोर नहीं मिल रहा है। मैंने आईट्यून्स कनेक्ट में लीडरबोर्ड स्थापित किया है। यहां कोड है जो स्कोर की रिपोर्ट करता है:सैंडबॉक्स लीडरबोर्ड खाली
- (void) reportScore: (int64_t) score forCategory: (NSString *) category {
GKScore *scoreReporter = [[[GKScore alloc] initWithCategory:category] autorelease];
scoreReporter.value = score;
[scoreReporter reportScoreWithCompletionHandler:^(NSError *error) {
if (error != nil)
{
UIAlertView* alert= [[[UIAlertView alloc] initWithTitle: @"Score Report Failed!" message: [NSString stringWithFormat: @"Reason: %@", [error localizedDescription]] delegate: self cancelButtonTitle: @"Try Again..." otherButtonTitles: NULL] autorelease];
[alert show];
}
}];
}
कोड ठीक चल रहा है। अलर्ट कभी नहीं दिखाया जाता है। लेकिन, जब मैं गेम सेंटर में जाता हूं, तो लीडरबोर्ड खाली होता है। मैं एक्सकोड 4.2 और आईओएस 5 चला रहा हूँ। कोई विचार?