Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

reportAchievementWithCompletionHandler deprecated in iOS7 but replacement not specified

Has anyone found the replacement for

[GKAchievement reportAchievementWithCompletionHandler]?

Typically when things are deprecated the docs indicate a replacement. Not so with this one so far and I wanted to cross this off the list of possible causes of another issue we are seeing.

like image 630
MobileVet Avatar asked Dec 15 '22 05:12

MobileVet


1 Answers

Was looking for the same info and saw your post, here is what I went with after not finding anything either:

NSArray *achievements = [NSArray arrayWithObjects:achievement, nil];
[GKAchievement reportAchievements:achievements withCompletionHandler:^(NSError *error) {
   if (error != nil) {
      NSLog(@"Error in reporting achievements: %@", error);
   }
}];
like image 140
sillygoose Avatar answered Jan 04 '23 05:01

sillygoose