I am receiving always a Failure in my cocos2d, but when I run this project in my view based application then it will give me success, and the score will easily submitted
[[GKLocalPlayer localPlayer] authenticateWithCompletionHandler:^(NSError *error){
if (error ==nil) {
NSLog(@"Success");
} else {
NSLog(@"Fail");
}
}];
GKScore *myScoreValue = [[[GKScore alloc] initWithCategory:@"123"] autorelease];
myScoreValue.value = lastScore;
[myScoreValue reportScoreWithCompletionHandler:^(NSError *error){
if(error != nil){
NSLog(@"Score Submission Failed");
} else {
NSLog(@"Score Submitted");
}
}];