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

# PFAuthenticationLoginWithAppleAsync

> 使用 Apple 登录身份令牌为用户登录。

使用 Apple 登录身份令牌为用户登录。

## 语法

```cpp theme={null}
HRESULT PFAuthenticationLoginWithAppleAsync(  
    PFServiceConfigHandle serviceConfigHandle,  
    const PFAuthenticationLoginWithAppleRequest* request,  
    XAsyncBlock* async  
)  
```

### 参数

**`serviceConfigHandle`**   PFServiceConfigHandle

从 PFServiceConfigCreateHandle 调用返回的 PFServiceConfigHandle。

**`request`**   [PFAuthenticationLoginWithAppleRequest\*](/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationloginwithapplerequest)

已填充的请求对象。

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

用于异步操作的 XAsyncBlock。

### 返回值

类型：HRESULT

此 API 操作的结果代码。

## 备注

此 API 可在 iOS 和 macOS 上使用。另请参阅 ClientLinkAppleAsync、ClientUnlinkAppleAsync。异步任务完成后，调用 [PFAuthenticationLoginWithAppleGetResult](/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithapplegetresult) 获取结果。

## 要求

**头文件：** PFAuthentication.h

## 另请参阅

[PFAuthentication 成员](/services/playfab/api-references/c/pfauthentication/pfauthentication_members)


## Related topics

- [PFAuthenticationLoginWithAppleGetResult](/zh-CN/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithapplegetresult.md)
- [PFAuthenticationLoginWithAppleGetResultSize](/zh-CN/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithapplegetresultsize.md)
- [iOS 快速入门](/zh-CN/services/playfab/sdks/c/quickstart-ios.md)
- [macOS 快速入门](/zh-CN/services/playfab/sdks/c/quickstart-macos.md)
- [服务 C API 概览 - PFAuthentication.h](/zh-CN/services/playfab/api-references/c/pfauthentication/pfauthentication_members.md)
