Challenges

You can easily implement Game Center Challenge functionality in your game.

The following method will create a leaderboard challenge with predefined text, and user will be able select friends from the list before sending the Challenge:

GameCenterManager.issueLeaderboardChallenge(leaderBoardId2, "Here is tiny challenge for you");

You can do the same for achievements:

GameCenterManager.issueAchievementChallenge(TEST_ACHIEVEMENT_1_ID, "Here is tiny challenge for you");

 

If you are using your own UI for Game Center, you can allow player to select friends for the Challenge using the game UI, then use following methods for sending the Challenge with predefined friends list:

//Leaderboard
public static void issueLeaderboardChallenge(string leaderBoradrId, string message, string playerId);
public static void issueLeaderboardChallenge(string leaderBoradrId, string message, string[] playerIds);

//Achievements
public static void issueAchievementChallenge(string achievementId, string message, string playerId);
public static void issueAchievementChallenge(string achievementId, string message, string[] playerIds);

 

Use of the Challenges API can be found in following example scenes:

GameCenterGeneral 

CustomLeaderBoardGUIExample