我嘗試在我的iPhone遊戲中測試遊戲中心,但是當我嘗試連接下面的代碼行時,我收到一條警告,提示「此遊戲未被Game Center識別。」。iTunes connect啓用遊戲中心
[[GKLocalPlayer localPlayer] authenticateWithCompletionHandler:^(NSError *error) {
if (error == nil)
{
// Insert code here to handle a successful authentication.
}
else
{
// Your application can process the error parameter to report the error to the player.
}
}];
現在我已經閱讀了很多論壇並查看了Apple的文檔,但是我找不到如何在iTunes連接中啓用Game Center選項。我想我需要先將應用程序添加到「管理應用程序」,然後啓用Game Center選項。但是,我怎樣才能添加一個應用程序只用於測試?
感謝所有幫助:)
的Cocos2D認可與Game Center無關。 – chrs 2014-01-13 15:24:05