Haseeb Warraich
Haseeb Warraich

Reputation: 151

game center score submission problem

i have integrate game center in my game ...and its working well but i have i new problem now :P only one score is submit of user .. after that no score submit even its greater then posted score or less... any idea what i have to exactly doo... Regards Haseeb

Upvotes: 1

Views: 949

Answers (1)

Rony
Rony

Reputation: 1229

i use this to submit score......after being sure that the game center is available...

NSAutoreleasePool   *pool = [[NSAutoreleasePool alloc]init];

    GKScore *scoreReporter = [[[GKScore alloc] initWithCategory:gameCenterCategory] autorelease];

    int64_t score1 =socre;
    scoreReporter.value = score1;
    [scoreReporter reportScoreWithCompletionHandler:^(NSError *error) { 
        if (error != nil) {
            NSLog(@"Submit failed");
        }
        else {
            NSLog(@"Score Submited");
        }
    }];

    [pool release];

Upvotes: 1

Related Questions