跳轉到主要內容
PFAuthenticationLoginWithGameCenterRequest 資料模型。Game Center 玩家識別碼 (https://developer.apple.com/library/ios/documentation/Accounts/Reference/ACAccountClassRef/index.html# // apple_ref/occ/instp/ACAccount/identifier) 是儲存在本機裝置上的產生字串。與裝置識別碼一樣,必須小心絕不向終端使用者公開玩家的 Game Center 識別碼,因為這可能導致使用者的帳戶遭到入侵。如果這是使用者第一次使用 Game Center 登入,且 CreateAccount 設定為 true,系統將會建立新的 PlayFab 帳戶,並將其連結至 Game Center 識別碼。在此情況下,不會有任何電子郵件或使用者名稱與該 PlayFab 帳戶相關聯。否則,如果沒有任何 PlayFab 帳戶連結至 Game Center 帳戶,將會傳回指出此情況的錯誤,讓遊戲可以引導使用者建立 PlayFab 帳戶。如果使用無效的 iOS Game Center 玩家識別碼,將會傳回指出此情況的錯誤。

語法

成員

createAccount   bool 如果目前沒有 PlayFab 帳戶連結至此識別碼,則自動建立一個。 customTags   PFStringDictionaryEntry const*
may be nullptr
(選擇性)與要求相關聯的選擇性自訂標籤(例如組建編號、外部追蹤識別碼等)。 customTagsCount   uint32_t customTags 的計數 infoRequestParameters   PFGetPlayerCombinedInfoRequestParams const*
may be nullptr
(選擇性)指定要為使用者傳回哪些資訊的旗標。 playerId   const char*
is null-terminated
(選擇性)唯一的 Game Center 玩家識別碼。 playerSecret   const char*
is null-terminated
(選擇性)用來驗證 API 要求簽章的玩家密碼。 publicKeyUrl   const char*
is null-terminated
(選擇性)將用來驗證簽章之公開加密金鑰的 URL。 salt   const char*
is null-terminated
(選擇性)用來計算雜湊並使其保持隨機的隨機值。 signature   const char*
is null-terminated
(選擇性)驗證承載的驗證簽章。 timestamp   const char*
is null-terminated
(選擇性)簽章建立日期和時間的整數表示法。PlayFab 會拒絕與伺服器目前時間相差超過 10 分鐘的驗證簽章。

需求

標頭: PFAuthenticationTypes.h

另請參閱

PFAuthenticationTypes 成員
最後修改於 2026年10月6日