Hi,
I created a leaderboard in my application, and a method to record a new score:
GKLeaderboard.loadLeaderboards(IDs: [leaderboardID]) { (leaderboards, error) in
if let error = error {
print("Error loading leaderboards: \(error.localizedDescription)")
}
guard let leaderboard = leaderboards?.first else {
print("Leaderboard not found")
return
}
leaderboard.submitScore(score, context: 0, player: self.localPlayer) { error in
if let error = error {
print("Error reporting score: \(error.localizedDescription)")
} else {
print("Score reported successfully!")
}
}
}
}
When debuging, this method is correctly called and I have a success, so I tried to test it with an internal TestFlight release.
The leaderboard is never updated.
Is there a way to perform a test of a leaderboard before publishing the app?
I have the same question for achievements:
let achievement = GKAchievement(identifier: identifier)
achievement.percentComplete = percentComplete
GKAchievement.report([achievement]) { error in
if let error = error {
print("Error reporting achievement: \(error.localizedDescription)")
}
}
}
Thanks!