GameCenter Guide - working setup - 4.15

Yo :slight_smile:
I received a PM asking for some more details on the gameCenter setup I use. Rather than just reply I thought I’d create a post with as much info as I have and could remember
First off AFAIK there is still no multiplayer support so this just covers Leaderboards, Achivements and In-App Purchases ( IAP ). Leaderboards only grab the highest score in Blueprints.
The tutorials from Epic on youtube cover a lot of this but not all in one place, from what I remember. I think the Unreal Match 3 video the most information, especially around achievements and what values to use ( if differs between android and iOS)
So … here goes

Apple Developer site
Obviously , you need an Apple developer account first:)
Certificates , Identifiers & Profiles

App IDs

Provisioning Profiles
- Distribution
This is distrubution profile as we need to upload the .apk to iTunes Connect ( needs an Apple Mac and the Apple Uploader software or xCode )

iTunes Connect Website
First upload your .apk ( you need to package for distribution and sign with your distribution cert in unreal ( see below ))

App Information – Make sure bundle ID matches AppID . From memory i think you pick the app from a list of your apps so this will always be correct, presuming you picked the correct app

In short you will reference the ID of each item in your blueprints ( IAP - product ID , Leaderboard ID , Achievement ID )




Now just add some testers , set your version of the app up for them to test and then have them download it through TestFlight ( Once you have done this it seems that you can push development builds from the editor to your phone/ipad and the online functionality still works )

I have online subsystem set in two places, here you go

C:\Program Files\Epic Games\UE_4.15\Engine\Config\IOS\IOSEngine.ini


Editor Settings
Edit Project Settings
In packaging tick ‘For Distribution’ , it should automatically set to ‘Shipping’
Note the Bundle Identifier matches the Development cert and what shown in iTunes connect

I have one blueprint that handles all the gamecenter stuff . My player controller creates an instance of this class to use for its online services. You can just put all the online stuff directly in the Event Graph of your player controller. I created a separate class so I could reuse it more easily. The instance of GameCenterHandler is passed a reference to the controller that owns it as the game center nodes need a player controller.

Player controller creating an instance of the GameCenterHandler class

The rest of this stuff is in my gameCenterHandler class but like I said you could just put this directly in the event graph of your player controller
A lot of the game center functions are latent so I created custom events in the event graph as you can’t have latent calls in functions. I only call the events from functions in my gameCenterHandler, they sanitize input, parse raw leaderboard data back into game appropriate data etc. . It’s these functions that I make public not the events, again, this is to make it more reusable


When this all works you will get a ‘Welcome back gameCenterUser’ popup over your app when you login

Any questions or mistakes etc. let me know


Sorry , I know this is in the wrong place … trying to figure out how to move it to the IOS area :S


In IOSEngine.ini, I found the “DefaultPlatformService” entry. It was set to something like “MCP”. Don’t know it exactly anymore. :smiley:
But i couldn’t find the “DefaultPlatformService” in the DefaultEngine.ini.
Do I have to add it manually?

And then I have also a question about the Leaderboards.
In the Game Center section, I hade to create a group for the services.
And now every Leaderboard-ID is forced to have a “grp.” prefix.

My Leaderboards are already Live and called like this: “grp.normal_mode”.
The Type is also “Single”.

When I want to open a Leaderboard, nothing happens…

Thank you in advance :slight_smile:



The change of “DefaultPlatformService=” from “MCP” to “IOS” was the crucial point.
Everything works now as expected. :slight_smile:

Thank you soo much!! :o:o


glad it helped :smiley:


Hi insanerob,
Is it necessary to login to Game Center to read or make in app purchases? In Android it is not needed. Do IOS behave differently?

Amazing guide! As @w0lfi suggested, changing the DefaultPlatformService from MCP to IOS was the key!

Thank you for your tutorial!

I’m trying to do this for our app, but I have a development certificate and provision instead.

I added the “Show External Login” BP function and it runs when the app starts up (even tried a delay before it for safety).

When running the game using the project launcher, the result of running the function is always a failure.

Is there something I’m missing to tell my game to connect with Game Center?

Note: I’ve downloaded Unreal’s Match 3 and tied my provision/certificate to that app and it logs in successfully. However, I cannot find a difference between their and my logic.

Nevermind, it turns out I never checked the “Online Subsystem iOS” plugin in the Editor.

If you’re still updating this tutorial, I’d recommend adding this in. Though obvious, others may miss this like I did :).

Thank you for your tutorial again! Without it I’d probably miss setting up lots of other things. :stuck_out_tongue: