> ## 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.

# PFAuthenticationServerLoginWithIOSDeviceIDAsync

> Inicia la sesión del usuario mediante el identificador de dispositivo iOS y devuelve un identificador de sesión que se puede usar posteriormente para llamadas API que requieren un usuario autenticado

Inicia la sesión del usuario mediante el identificador de dispositivo iOS y devuelve un identificador de sesión que se puede usar posteriormente para llamadas API que requieren un usuario autenticado

## Sintaxis

```cpp theme={null}
HRESULT PFAuthenticationServerLoginWithIOSDeviceIDAsync(  
    PFServiceConfigHandle serviceConfigHandle,  
    const char* secretKey,  
    const PFAuthenticationServerLoginWithIOSDeviceIDRequest* request,  
    XAsyncBlock* async  
)  
```

### Parámetros

**`serviceConfigHandle`**   PFServiceConfigHandle

PFServiceConfigHandle devuelto de la llamada a PFServiceConfigCreateHandle.

**`secretKey`**   char\*<br />*In\_z*

Clave secreta del título que se usa para autenticar la solicitud de servicio.

**`request`**   [PFAuthenticationServerLoginWithIOSDeviceIDRequest\*](/es/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationserverloginwithiosdeviceidrequest)

Objeto de solicitud rellenado.

**`async`**   XAsyncBlock\*<br />*Inout*

XAsyncBlock para la operación asincrónica.

### Valor devuelto

Tipo: HRESULT

Código de resultado de esta operación de API.

## Comentarios

Esta API está disponible en Windows. En dispositivos iOS, se debe usar 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) como DeviceId, ya que uniqueIdentifier de UIDevice está en desuso desde iOS 5, y el uso de advertisingIdentifier para este propósito provocará un error en el proceso de certificación de Apple. Si es la primera vez que un usuario inicia sesión con el dispositivo iOS y CreateAccount está establecido en true, se creará una nueva cuenta de PlayFab y se vinculará al identificador de dispositivo iOS específico del proveedor. En este caso, no se asociará ningún correo electrónico ni nombre de usuario a la cuenta de PlayFab. De lo contrario, si ninguna cuenta de PlayFab está vinculada al dispositivo iOS, se devolverá un error que lo indica, para que el título pueda guiar al usuario en la creación de una cuenta de PlayFab. Cuando se complete la tarea asincrónica, llame a [PFAuthenticationServerLoginWithIOSDeviceIDGetResult](/es/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithiosdeviceidgetresult) para obtener el resultado.

## Requisitos

**Encabezado:** PFAuthentication.h

## Consulte también

[Miembros de PFAuthentication](/es/services/playfab/api-references/c/pfauthentication/pfauthentication_members)


## Related topics

- [PFAuthenticationServerLoginWithIOSDeviceIDGetResultSize](/es/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithiosdeviceidgetresultsize.md)
- [PFAuthenticationServerLoginWithIOSDeviceIDGetResult](/es/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithiosdeviceidgetresult.md)
- [PFAuthenticationServerLoginWithAndroidDeviceIDAsync](/es/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithandroiddeviceidasync.md)
- [PFAuthenticationServerLoginWithAndroidDeviceIDGetResult](/es/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithandroiddeviceidgetresult.md)
- [PFAuthenticationServerLoginWithAndroidDeviceIDGetResultSize](/es/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithandroiddeviceidgetresultsize.md)
