I have been at a standstill for quite some time. I understand how to unlock an achievement in Game Center, and I even got a whole messaging system. But I canβt figure out how to check if the achievement is already unlocked :(
This does not seem to work:
GKAchievement *achievement = [[GKachievement alloc] initWithIdentifier:ident] autorelease]; NSLog(@"%i",achievement.completed);
It always tracks "0".
Unlocking achievements really works:
GKAchievement *achievement = [[GKachievement alloc] initWithIdentifier:ident] autorelease]; achievement.percentComplete = 100;
So, itβs not that I made a mistake in the whole achievement of the goal, itβs just that GameKit cannot tell me if the achievement is already unlocked or not.
I would really appreciate if anyone could help me!
source share