Adding Friends in Game Center
Problem
You have learned to authenticate the local player, but to test Game Center APIs on other players, you want to add some friends to the local player’s account.
Solution
Use the iOS Simulator built-in Game Center app to add friends to the local player, as demonstrated in the Discussion section.
Discussion
To add a friend in Game Center on the sandbox server, follow these steps:
Open the iOS Simulator if it’s not already open.
Open the Game Center app in the Simulator.
Log in, if you are not logged in already.
Once logged in, from the bottom of the screen, select the Friends tab.
Press + on the navigation bar.
In the Friend Request screen, type the nickname or the email address of the friends you want to add to your list.
Once done, press Send on the navigation bar in the top righthand corner.
Game Center will then let you know whether it could send the invites or not.
It just couldn’t be simpler than this!
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access