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

> Connecte l'utilisateur à l'aide de l'identificateur d'appareil iOS, en retournant un identificateur de session qui peut ensuite être utilisé pour les appels d'API nécessitant un utilisateur authentifié

Connecte l'utilisateur à l'aide de l'identificateur d'appareil iOS, en retournant un identificateur de session qui peut ensuite être utilisé pour les appels d'API nécessitant un utilisateur authentifié

## Syntaxe

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

### Paramètres

**`serviceConfigHandle`**   PFServiceConfigHandle

PFServiceConfigHandle retourné par l'appel à PFServiceConfigCreateHandle.

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

Clé secrète du titre utilisée pour authentifier la requête de service.

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

Objet de requête rempli.

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

XAsyncBlock pour l'opération asynchrone.

### Valeur de retour

Type : HRESULT

Code de résultat de cette opération d'API.

## Remarques

Cette API est disponible sur Windows. Sur les appareils 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) doit être utilisé comme DeviceId, car UIDevice uniqueIdentifier est déprécié depuis iOS 5, et l'utilisation d'advertisingIdentifier à cette fin entraînera l'échec du processus de certification d'Apple. S'il s'agit de la première connexion d'un utilisateur avec l'appareil iOS et que CreateAccount est défini sur true, un nouveau compte PlayFab sera créé et lié à l'ID d'appareil iOS propre au fournisseur. Dans ce cas, aucune adresse courriel ni aucun nom d'utilisateur ne sera associé au compte PlayFab. Sinon, si aucun compte PlayFab n'est lié à l'appareil iOS, une erreur l'indiquant sera retournée, afin que le titre puisse guider l'utilisateur dans la création d'un compte PlayFab. Une fois la tâche asynchrone terminée, appelez [PFAuthenticationServerLoginWithIOSDeviceIDGetResult](/fr-CA/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithiosdeviceidgetresult) pour obtenir le résultat.

## Configuration requise

**En-tête :** PFAuthentication.h

## Voir aussi

[Membres PFAuthentication](/fr-CA/services/playfab/api-references/c/pfauthentication/pfauthentication_members)


## Related topics

- [PFAuthenticationServerLoginWithIOSDeviceIDGetResultSize](/fr-CA/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithiosdeviceidgetresultsize.md)
- [PFAuthenticationServerLoginWithIOSDeviceIDGetResult](/fr-CA/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithiosdeviceidgetresult.md)
- [Vue d'ensemble de l'API C Services - PFAuthentication.h](/fr-CA/services/playfab/api-references/c/pfauthentication/pfauthentication_members.md)
- [PFAuthenticationServerLoginWithAndroidDeviceIDAsync](/fr-CA/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithandroiddeviceidasync.md)
- [PFAuthenticationServerLoginWithAndroidDeviceIDGetResult](/fr-CA/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithandroiddeviceidgetresult.md)
