About percentComplete in GKAchievement

After testing, I find that although the percentComplete type from GKAchievement doubles, the legal values ​​in the Apple help document range from 0.0 to 100.0. but if you tell percentComplete = 1.5 to the apple server, next time you get percentComplete = 1.0 (another example, report 0.5, get 0.0). So I just think this might be a percentComplete error. Now our project has some achievements that need to be accumulated, for example, to finish 200 times, we do not save the value in local, but report the current calculated times to the apple server, for calculation next time.

I just tested in SandBox with iOS 4.2, I don’t know if it will only be in SandBox, so will anyone also find this problem, what is your desktop?

+5
source share
1 answer

Answer from Apple: “Interest is reported using doubles, but stored as integers, for example 1%, 2%, 3%, ..., 100%.
You should probably keep the progress anyway, as they may be where something with which they cannot connect to Game Center.

For those who have access to the Apple dev forums: https://devforums.apple.com/message/522769

+5
source

All Articles