> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PFAuthenticationServerLoginWithIOSDeviceIDRequest

> PFAuthenticationServerLoginWithIOSDeviceIDRequest 数据模型。在 iOS 设备上，必须使用 identifierForVendor (https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIDevice_Class/index.html# // apple_ref/occ/instp/UIDevice/identifierForVendor) 作为 DeviceId，因为自 iOS 5 起 UIDevice uniqueIdentifier 已被弃用，且将 advertisingIdentifier 用于此目的将导致无法通过 Apple 的认证流程。如果这是用户首次使用该 iOS 设备登录且 CreateAccount 设为 true，将创建一个新的 PlayFab 帐户并链接到该供应商特定的 iOS 设备 ID。在这种情况下，该 PlayFab 帐户将没有关联的电子邮件或用户名。否则，如果没有 PlayFab 帐户链接到该 iOS 设备，将返回相应的错误，以便游戏引导用户创建 PlayFab 帐户。

PFAuthenticationServerLoginWithIOSDeviceIDRequest 数据模型。在 iOS 设备上，必须使用 identifierForVendor ([https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIDevice\_Class/index.html#](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIDevice_Class/index.html#) // apple\_ref/occ/instp/UIDevice/identifierForVendor) 作为 DeviceId，因为自 iOS 5 起 UIDevice uniqueIdentifier 已被弃用，且将 advertisingIdentifier 用于此目的将导致无法通过 Apple 的认证流程。如果这是用户首次使用该 iOS 设备登录且 CreateAccount 设为 true，将创建一个新的 PlayFab 帐户并链接到该供应商特定的 iOS 设备 ID。在这种情况下，该 PlayFab 帐户将没有关联的电子邮件或用户名。否则，如果没有 PlayFab 帐户链接到该 iOS 设备，将返回相应的错误，以便游戏引导用户创建 PlayFab 帐户。

## 语法

```cpp theme={null}
typedef struct PFAuthenticationServerLoginWithIOSDeviceIDRequest {  
    bool createAccount;  
    PFStringDictionaryEntry const* customTags;  
    uint32_t customTagsCount;  
    const char* deviceId;  
    const char* deviceModel;  
    PFGetPlayerCombinedInfoRequestParams const* infoRequestParameters;  
    const char* OS;  
} PFAuthenticationServerLoginWithIOSDeviceIDRequest;  
```

### 成员

**`createAccount`**   bool

如果当前没有 PlayFab 帐户链接到此 ID，则自动创建一个。

**`customTags`**   PFStringDictionaryEntry const\*<br />*may be nullptr*

（可选）与请求关联的可选自定义标记（例如生成号、外部跟踪标识符等）。

**`customTagsCount`**   uint32\_t

customTags 的数量

**`deviceId`**   const char\*<br />*is null-terminated*

用户设备的供应商特定 iOS 标识符。

**`deviceModel`**   const char\*<br />*is null-terminated*

（可选）用户设备的具体型号。

**`infoRequestParameters`**   PFGetPlayerCombinedInfoRequestParams const\*<br />*may be nullptr*

（可选）用于指定要为用户返回哪些信息的标志。

**`OS`**   const char\*<br />*is null-terminated*

（可选）用户设备的具体操作系统版本。

## 要求

**头文件：** PFAuthenticationTypes.h

## 另请参阅

[PFAuthenticationTypes 成员](/zh-CN/services/playfab/api-references/c/pfauthenticationtypes/pfauthenticationtypes_members)


## Related topics

- [PFAuthenticationServerLoginWithIOSDeviceIDAsync](/zh-CN/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithiosdeviceidasync.md)
- [PFAuthenticationServerLoginWithAndroidDeviceIDRequest](/zh-CN/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationserverloginwithandroiddeviceidrequest.md)
- [PFAuthenticationServerLoginWithAndroidDeviceIDAsync](/zh-CN/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithandroiddeviceidasync.md)
- [PFAuthenticationServerLoginWithIOSDeviceIDGetResult](/zh-CN/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithiosdeviceidgetresult.md)
- [PFAuthenticationServerLoginWithAndroidDeviceIDGetResult](/zh-CN/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithandroiddeviceidgetresult.md)
