Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

GameCenter Achievements wont pop

Discussion in 'iOS and tvOS' started by mark_gr, Apr 27, 2020.

  1. mark_gr

    mark_gr

    Joined:
    Jan 16, 2015
    Posts:
    22
    Hello, we are having trouble popping our Game Center achievements on our app in development.
    We are using Unity2019.3.9, and the app is in beta and we are testing on TestFlight.

    When we achieve the requirements in TestFlight we call the Social.ReportProgress and the callback returns true.

    However the achievement popup does not appear and even if we call Social.ShowAchievementsUI the UI does not show the achievement completed.

    However there are some achievements that we added earlier in development that do work.
    Only ones we added recently do not pop.

    Is there anything we need to do after adding achievements for them to be able to achieved?

    Our code is:
    Code (CSharp):
    1. static public void GameCenterReportProgress(string _id, double _progress, UnityAction<bool> _callback)
    2. {
    3.     if(Social.localUser.authenticated == false)
    4.     {
    5.         return;
    6.     }
    7.     double progress = _progress * 100.0;
    8.     if(progress >= 99.999 && progress < 100.0)
    9.     {
    10.         progress = 100.0;
    11.     }
    12.     else if(progress > 100.0)
    13.     {
    14.         progress = 100.0;
    15.     }
    16.     Social.ReportProgress(_id, progress, _success => {
    17.         Log($"GameCenter ReportProgress {_id} result:{_success}");
    18.         _callback.Invoke(_success);
    19.     });
    20. }
     
  2. FathomMaster

    FathomMaster

    Joined:
    Jun 20, 2018
    Posts:
    6
    Did you ever solve this? I'm in a similar place and finding very little information on how to make it work.