Search Unity

Bug GameCenterPlatform.ShowDefaultAchievementCompletionBanner not working as described

Discussion in 'iOS and tvOS' started by Freddicus, May 22, 2022.

  1. Freddicus

    Freddicus

    Joined:
    Feb 4, 2015
    Posts:
    19
    Hello and thank you for taking the time to view my post.

    I’ve been scouring the internet for information related to the API mentioned in this thread’s subject. Best I can garner is that there was a bug early on in the Unity 5.x days but the trail goes cold after it was ostensibly fixed.

    I cannot get this to work for the life of me. I’m able to successfully log into Game Center. I’m able to successfully report achievement progress. I’m also able to view the completed achievements in Game Center. I even refactored my code so it wouldn’t load a new scene during submission to Game Center. My code more or less looks exactly like the example code. Set flag. Authenticate. Report progress in success condition of Auth.

    My background is that I’m a professional software engineer, and I’m at a loss on how to debug this black box piece of functionality.

    I’ve posted to Reddit and in several Discord communities, and no one has responded to me. Please help. I don’t know where else to turn.

    API link: https://docs.unity3d.com/ScriptRefe...m.ShowDefaultAchievementCompletionBanner.html

    Edit: I’m on 2021.3.3f1 LTS Apple Silicon

    Edit 2: Short of reverse engineering Unity, in GameKit I imagine the analogous property is this: https://developer.apple.com/documen...t/1521058-showscompletionbanner?language=objc

    I see plenty of il2cpp code in the compiled Xcode project with regards to ShowDefaultAchievementCompletionBanner, but I think it's all just internal calls to Unity Engine and not native Objective-C or Swift that invokes GameKit.
     
    Last edited: May 23, 2022
    dan_ginovker likes this.
  2. Freddicus

    Freddicus

    Joined:
    Feb 4, 2015
    Posts:
    19
    I've seen some threads that might imply that Sandbox accounts might be to blame, but I've also seen replies in those threads that it's just flakey. Would love some feedback from anyone who has used Game Center achievements successfully.
     
    dan_ginovker likes this.
  3. Freddicus

    Freddicus

    Joined:
    Feb 4, 2015
    Posts:
    19
    I’m going to go forward with releasing my game assuming that the achievement banners are just finicky in Game Center Sandbox. I will post the results here once the game is approved and a release build is tested. In the meantime, if anyone has had success with this API call, please reply to the thread.
     
    dan_ginovker likes this.
  4. Sigono-Unity4

    Sigono-Unity4

    Joined:
    Aug 27, 2020
    Posts:
    11
    May I know if the achievement banners were successful after approval?

    We are currently having exactly the same problem, GameCenter login is successful, achievements show up correctly (unlocked and so on) in the Dashboard, but there is absolutely no achievement banner appearing at the point where the achievement is being unlocked.
     
    dan_ginovker likes this.
  5. Freddicus

    Freddicus

    Joined:
    Feb 4, 2015
    Posts:
    19
    Hey there! I won't leave you hanging on a reply. Long story short is: I don't think so. The Game Center was not sandboxed like IAPs are, so any high scores recorded during Test Flight remained after release. I'm a little disappointed, but it is what it is. Developing this game was mainly a learning experience.

    If you want to test the banners for yourself, it's in the App Store under "Tap the Thing!". To get the first achievement, you just have to make it passed 10 things. You can verify your achievement by opening the leaderboard manually by tapping the podium icon (visible in game over or settings).

    Good luck!
     
  6. Sigono-Unity4

    Sigono-Unity4

    Joined:
    Aug 27, 2020
    Posts:
    11
    Thanks for the reply!
     
  7. spakment

    spakment

    Joined:
    Dec 19, 2017
    Posts:
    96
    Freddicus likes this.
  8. Freddicus

    Freddicus

    Joined:
    Feb 4, 2015
    Posts:
    19
    Oh man - cross platform mobile apps with social are going to be a preprocessor directive soup nightmare. o_0

    Thanks for the update! I might try to integrate with this and submit a patch for my game.
     
    spakment likes this.