0

I have a rather disturbing problem. When I unlock an achievement, I show a notification about it. It is triggered when achievement.completed == YES. On the Simulator, this is ok, achievement.completed is true and the notification shows. However, on any device this is false and no notification is shown! I use the same code, nothing changes, I don't have any #ifdef's for Simulator.

Code:

if (achievement.completed) {
    [self showAchievementNotification: [_achievementDescriptions objectForKey:achievement.identifier]];
}

I modified the code, so it works now:

if (achievement.percentComplete >= 100.0f && percentComplete == achievement.percentComplete) {
    [self showAchievementNotification: [_achievementDescriptions objectForKey:achievement.identifier]];
}

This works perfectly.

McDermott
  • 1,025
  • 2
  • 16
  • 28

1 Answers1

0

I managed to figure out another way. I edited the question, the last code snippet has the anwser.

McDermott
  • 1,025
  • 2
  • 16
  • 28