Hello,
I have a problem unlocking achievements on IOS with “Social” class.
I try to use Social.ReportProgress but nothing happens (opposed to Android - which there everything work fine).
The same for incremental and normal achievements.
I looked at similar threads and used the GKAchievementReporter. It seems it fixed the problem for everybody, but not for me.
The problem happens in sandbox and production as well.
I know that connection to Game Center is established as leaderboard is working fine.
this is the code:
// Social.ReportProgress (achievement100LessInTheAir, (enemyPlanesDestroyed / 100D) * 100D, null);
// Social.ReportProgress (achievement500LessInTheAir, (enemyPlanesDestroyed / 500D) * 100D, null);
// Social.ReportProgress (achievementClearSky, (enemyPlanesDestroyed / 2000D) * 100D, null);
GKAchievementReporter.ReportAchievement (achievement100LessInTheAir, ((float)enemyPlanesDestroyed / 100f) * 100f, true);
GKAchievementReporter.ReportAchievement (achievement500LessInTheAir, ((float)enemyPlanesDestroyed / 500f) * 100f, true);
GKAchievementReporter.ReportAchievement (achievementClearSky, ((float)enemyPlanesDestroyed / 2000f) * 100f, true);
//
#endif
// Social.ReportProgress (achievementSurvivor, (PlayerPrefs.GetFloat ("BestTime", 0) >= 120) ? 100d : 0, null);
// Social.ReportProgress (achievementTheUltimateSurvivor, (PlayerPrefs.GetFloat ("BestTime", 0) >= 300) ? 100d : 0, null);
// Social.ReportProgress (achievementWelcomeBackCannoneer, (PlayerPrefs.GetInt ("LevelReached", 1) > 1) ? 100d : 0, null);
// Social.ReportProgress (achievementFireBreath, (PlayerPrefs.GetInt ("RedDragon", 0) == 1) ? 100d : 0, null);
GKAchievementReporter.ReportAchievement (achievementSurvivor, (PlayerPrefs.GetFloat ("BestTime", 0) >= 120) ? 100f : 0, true);
GKAchievementReporter.ReportAchievement (achievementTheUltimateSurvivor, (PlayerPrefs.GetFloat ("BestTime", 0) >= 300) ? 100f : 0, true);
GKAchievementReporter.ReportAchievement (achievementWelcomeBackCannoneer, (PlayerPrefs.GetInt ("LevelReached", 1) > 1) ? 100.0 : 0, true);
GKAchievementReporter.ReportAchievement (achievementFireBreath, (PlayerPrefs.GetInt ("RedDragon", 0) == 1) ? 100f : 0, true);
int threeStars = StoreManager.Instance.SumLevelThreeStars ();
// Social.ReportProgress (achievementAhui1, threeStars >= 10 ? 100d : 0, null);
// Social.ReportProgress (achievementAhui2, threeStars >= 20 ? 100d : 0, null);
// Social.ReportProgress (achievementAhui3, threeStars >= 30 ? 100d : 0, null);
GKAchievementReporter.ReportAchievement (achievementAhui1, threeStars >= 10 ? 100f : 0, true);
GKAchievementReporter.ReportAchievement (achievementAhui2, threeStars >= 20 ? 100f : 0, true);
GKAchievementReporter.ReportAchievement (achievementAhui3, threeStars >= 30 ? 100f : 0, true);
Hope someone can shed some light what am i doing wrong.
Thank you,
Lior.