05/15/2024 15:19:45

GameCenter Channel Description

I. Overview

I. Overview

GameCenter is Apple Game Center and is a social channel provided by Apple for the iOS platform. It provides leaderboards and challenges. It can also help lightweight online games manage achievements and leaderboards, thus reducing the developer's workload.

Game Center Overview

Game Center provides the following mechanisms:

  • User Management and Verification: Your game no longer has to consider how to implement user registration, login, password retrieval, storage scores and other cumbersome functions. Game Center provides a local player for your game. This object is shared by all games. You only need to call it;
  • Leaderboards: You can easily have one or more leaderboards by specifying the ranking method in iTunesConnect;
  • Records and achievements: Your game needs to define milestones and can save progress by calling Game Center.
  • Challenges: Game Center provides a mechanism for players to challenge other players.

Apple official Game Center Development Guide

Apple official Game Center Configuration Guid

II. Developer Platform Configuration

II. Developer Platform Configuration

2.1 Create iOS App

Log in Apple Developer Center, click [Certificates, IDs & Profiles] tab from the left navigation bar, and follow the instructions to create APP and get Bundle ID

Create  iOS  app _1 Create  iOS  app _2

2.2 iTunes Connect configuration

Log in iTunes Connect, Bundle ID gotten according to Step 1 adds iTunes Connect APP iTunes Connect configuration_1 Click Feature->GameCenter, enter GameCenter configuration, and enable GameCenter functions; next, the game can set its own leaderboards and achievements. iTunes Connect  configuration_2

2.3 Leaderboard and Achievements

Leaderboard's configuration is shown in the following diagram (Achievement's configuration is similar to that of Leaderboard) iTunes leaderboard configuration_1 For each field, click on the file icon behind the input box, and there will be a detailed explanation of it. Among them

  • sort Order: The content in the leaderboard is sorted in ascending or descending order.
  • Score Format Type: The type of the score.

After the configuration is completed, save it. This completes the configuration of a leaderboard. We can add multiple leaderboards according to our needs. They can support multiple languages. For each language supported, it is needed to complete a language-adding operation.

III. iOS Project Configuration

III. iOS Project Configuration

3.1 Bundle ID

Configure Bundle identifier of Info.plist in the project, making it the same with Bundle ID in iTunes Connect; otherwise, when you try to login GameCenter, an error will be prompted not to support GameCenter.

3.2 Enable Game Center Feature

Select the project target. In the Capabilities tab, enable Game Center section. Xcode will automatically add GameKit.framework to the project's dependency.

iTunes Leaderboard configuration_1

3.3 System Library Dependency

  • GameKit.framework
IV. Function Description

IV. Function Description

4.1 Login Function

  1. After iOS 10, Game Center will continue to exist as a service, but Game Center's standalone app will no longer appear on the user's device. Users can continue to use Game Center's related functions through Configuration->Game Center
  2. In the game, login Game Center. The expression form is mainly divided into the following two types:

    • Configuration->Game Center Already logged in : execute silent login and pop up the welcome back, xxxx banner. The whole login process will not block the game process;

      Gamecenter login_1

    • Configuration->Game Center Not login yet; the login box used to login GameCenter will pop up in the game. After the user cancels the login three times, the GameCenter login box will not be launched again in the game any longer. It is needed to guide the user to return Configuration->Game Center to manually login GameCenter.

      Gamecenter login_2

V. FAQs

V. FAQs

5.1 Cancel GameCenter binding

When Login plugin is bound with GameCenter, the system always returns user cancellation. This is an Apple system limitation. In this case, the user needs to return to the game to bind after configuring manually logging in GameCenter in the cellphone.

5.2 Cancel GameCenter binding

Auth plugin GameCenter provides a silent binding function (retExtraJson->quietConnect, 1 stands for silent binding, 0 stands for manual binding). For silent binding, except for "retCode": 5, "thirdCode": 3 (need to restore operation!), other errors are not handled.



Copyright © 2024 MSDK.
All rights reserved.

results matching ""

    No results matching ""