nihalahmed / GameCenterManager

iOS Game Center helper singleton
Other
715 stars 128 forks source link

-[GKScore initWithLeaderboardIdentifier:]: unrecognized selector sent to instance #19

Open engmsaleh opened 10 years ago

engmsaleh commented 10 years ago

Hi,

I have this crash happens randomly , not always and happens mainly on iPad not on iPhone.

It happens mainly when my game wants to report the game-score using the following

[[GameCenterManager sharedManager] saveAndReportScore:bestScore leaderboard:@"2048Heroes" sortOrder:GameCenterSortOrderHighToLow];

I have traced through "GameCenterManager.m" to the following check in this method

- (void)saveAndReportScore:(int)score leaderboard:(NSString *)identifier sortOrder:(GameCenterSortOrder)order;

when the crash happens

    if ([self checkGameCenterAvailability] == YES) {
#if TARGET_OS_IPHONE
        GKScore *gkScore = [[GKScore alloc] initWithLeaderboardIdentifier:identifier];
#else
        GKScore *gkScore = [[GKScore alloc] initWithCategory:identifier];
#endif

Could you please help?

Thanks

Sam-Spencer commented 10 years ago

This is an issue that I've been trying to track down for a while! It occurs at seemingly random times and with seemingly no reason. Will keep you posted.

getaaron commented 9 years ago

Is it happening on versions of iOS before iOS 7?