GameCenter login alert

后端 未结 7 1360
无人共我
无人共我 2021-02-02 01:59

In a game I am developing using GameCenter, I want to handle the following scenario:

  1. the user starts up the game. He is shown the system alert that prompts him to
7条回答
  •  面向向阳花
    2021-02-02 02:12

    I'm facing the same issue. Though I couldn't find a way to enforce poping up the same dialog for logging into Game Center, I did find a way to implement a warning message saying 'gamecenter is disabled' when user clicks on a leaderboard icon:

    if([GKLocalPlayer localPlayer].authenticated == NO)
    {
    // Prompt a warning message alert saying game center is disabled
    }
    else
    {
    // Proceed with opening leaderboard
    }

    Hope this helps!

提交回复
热议问题