iOS Question GameCenter Error

hanyelmehy

Active Member
Licensed User
Longtime User
I use this Tutorial
i am able to log in and send Score
when try RequestScores i get this error message (i am sure that i use correct Leaderboard id)
B4X:
<B4IExceptionWrapper: Error Domain=GKErrorDomain Code=17 "The requested operations could not be completed because one or more parameters are invalid." UserInfo={GKServerStatusCode=5053, NSLocalizedDescription=The requested operations could not be completed because one or more parameters are invalid., NSUnderlyingError=0x283f81ef0 {Error Domain=GKServerErrorDomain Code=5053 "status = 5053, Leaderboard does not exist: 56053816 for game: "" ()" UserInfo={GKServerStatusCode=5053, NSLocalizedFailureReason=status = 5053, Leaderboard does not exist: 56053816 for game: "" ()}}}>
also when try to use this code
B4X:
Sub ShowLeaderboard
    Dim vc As NativeObject
    vc = vc.Initialize("GKGameCenterViewController").RunMethod("new", Null)
    vc.SetField("leaderboardCategory",BoardId)
    vc.SetField("viewState", 0) '0 = leadboards
    Dim del As NativeObject
    del = del.Initialize("B4IGameCenterViewControllerDelegate").RunMethod("new", Null)
    vc.SetField("gameCenterDelegate", del)
    Dim no As NativeObject = SPage1
    no.RunMethod("presentViewController:animated:completion:", Array(vc, True, Null))
End Sub
#if OBJC
@end
@interface B4IGameCenterViewControllerDelegate :NSObject<GKGameCenterControllerDelegate>
@end
@implementation B4IGameCenterViewControllerDelegate
- (void)gameCenterViewControllerDidFinish:(GKGameCenterViewController *)gameCenterViewController {
   [gameCenterViewController dismissViewControllerAnimated:YES completion:nil];
}

#End If

LeaderBoard Show with no Scores Found message ,even after submit my score successfully
 
Top