Search Unity

How to test Game Center achievements and leaderboards for Mac OS X build?

Discussion in 'macOS' started by BlueRanger117, Oct 24, 2017.

  1. BlueRanger117

    BlueRanger117

    Joined:
    Apr 18, 2015
    Posts:
    1
    I'm attempting to port my game to the Mac App Store. I want to include Achievements and Leaderboards. What is the workflow to test Achievements and Leaderboards before submitting the game to the app store?

    What I've done:

    In Unity - I've included code from https://docs.unity3d.com/Manual/net-SocialAPI.html website to test Logging in to Game Center and achievements. I've built the game on a Mac as a Standalone Mac OS X.

    In iTunesConnect - I've created the game record on the iTunesConnect website. In "Features" tab -> "Game Center", I've created the (46) Achievements and (1) Leaderboard. They all say "Not Live" in the Status column. In "App Store" tab -> "Prepare for Submission" I've ticked the "Game Center" toggle and included all the achievements and leaderboard I made on the other screen. I have not submitted the game submission for review because I need to test the code first. (right?)

    The game plays successfully in the Unity editor, but I was expecting to see a Game Center log-in dialogue box. I send myself a debug message which looks like Authentication completes successfully, but I'm not signed into Game Center on this Mac. I also get an error about not being able to find the achievement I created in iTunesConnect. Is it because they are marked as "Not Live"? Is it not working because I'm trying to test in the Unity editor? I tried launching the game from the icon which was created during the Build process, and I get the same results. I would like to be able to test this functionality while using Unity and hitting the play button while still in the unity editor (to have an easier time looking at the errors, and for a quicker edit/test dev cycle).

    I've tried following the https://developer.apple.com/library...nter_Guide/TestingYourApp/TestingYourApp.html guide at Apple, but I get stuck on step 4. Create a Sandbox account and go into Sandbox mode? How?! Also, Sandbox mode isn't even available anymore? https://developer.apple.com/library/content/technotes/tn2417/_index.html. Step 5 looks good, "Test your app following the guidelines in Testing Your Game Center-Aware Game in Game Center Programming Guide." but I cannot find this information. I'm not looking for information on how to submit my game to the store, but I'm just trying to test the Game Center functionality first. Thank you.
     
  2. xrix4096

    xrix4096

    Joined:
    Sep 29, 2016
    Posts:
    12
    I don't think you can make this work in the editor. If you look at the value of Social.Active to find the active platform this is always a dummy 'local' implementation in the editor. Try running the same code as a standalone build and if you have everything right you'll see the Game Center "Welcome" toast message.

    Game Center on macOS is a real lame duck as AFAIK there's no way to view or compare the leaderboards or achievements so you end up having to implement all of that in your own UI. Now Apple have even taken the Facebook / Twitter sharing away from Game Center it's not even very good on mobile. It feels like abandonware

    -- Chris
     
  3. kosted

    kosted

    Joined:
    Mar 14, 2015
    Posts:
    104
    Did you find a solution ?