I've been stumped on this for quite a long time. I understand how to unlock an achievement in Game Center and I even got a whole messaging system working. But I can't figure out how to check if an achievement has already been unlocked :(
Apparently this doesn't work:
GKAchievement *achievement = [[GKachievement alloc] initWithIdentifier:ident] autorelease];
NSLog(@"%i",achievement.completed);
It always traces "0".
Unlocking an achievement does work:
GKAchievement *achievement = [[GKachievement alloc] initWithIdentifier:ident] autorelease];
achievement.percentComplete = 100;
So it's not that I made a mistake in the whole achievement thingy, it's just that GameKit can't tell me if the achievement has already been unlocked or not.
I'd be very grateful if someone could help me with this!