跳转至

检查用户数据

如果您已成功登录,您可以查看已登录用户的个人信息和暂停信息。

用户资料曝光

Hive SDK 提供了在应用内的网页视图中公开用户个人资料的功能。要显示个人资料屏幕,您必须遵循以下步骤。

  1. 开发者实现一个按钮或用户界面元素,可以在应用中展示个人资料。
  2. 当用户在应用中选择这个按钮或用户界面元素时,应用利用 Hive SDK 的认证功能调用 AuthV4.showProfile


调用 AuthV4.showProfile 将显示由 Hive SDK 提供的个人资料屏幕。用户可以在个人资料屏幕上查看和更改他们的个人资料图片和昵称。


这是一个暴露个人资料的示例代码。

API 参考: AuthV4.showProfile

using hive;    
    // playerId of the logged-in user    
    Int64 playerId = 12345;    
    AuthV4.showProfile(playerId, (ResultAPI result) => {    
        if (result.isSuccess()) {    
            // Call successful    
        }    
});

API 参考: AuthV4::showProfile

#include <HIVE_SDK_Plugin/HIVE_CPP.h>    
    using namespace std;    
    using namespace hive;    
    // 已登录用户的 playerId    
    long long playerId = 12345;    
    AuthV4::showProfile(playerId, [=](ResultAPI const & result){    
        if (result.isSuccess()) {    
            // 调用成功    
        }    
});

API 参考: AuthV4.showProfile

import com.hive.AuthV4;
import com.hive.ResultAPI;
    // 已登录用户的 playerId    
    val playerId = 12345L    
    AuthV4.showProfile(playerId, object : AuthV4.AuthV4ShowProfileListener{    
        override fun onAuthV4ShowProfile(result: ResultAPI) {    
            if (result.isSuccess) {    
                // 调用成功    
            }    
        }    
})

API 参考: AuthV4.INSTANCE.showProfile

import com.hive.AuthV4;    
    import com.hive.ResultAPI;    
    // 已登录用户的 playerId    
    long playerId = 12345;    
    AuthV4.INSTANCE.showProfile(playerId, result -> {    
        if (result.isSuccess()) {    
            // 调用成功    
        }    
});

API 参考: AuthV4Interface.showProfile

import HIVEService    
    // playerId of the logged-in user    
    let playerId: Int64 = 12345    
    AuthV4Interface.showProfile(playerId) { result in    
        if result.isSuccess() {    
            // Call successful    
        }    
}

API 参考: [HIVEAuthV4 showProfile]

#import <HIVEService/HIVEService-Swift.h>    
    // 登录用户的 playerId    
    long long playerId = 12345;    
    [HIVEAuthV4 showProfile: playerId handler: ^(HIVEResultAPI *result) {    
        if ([result isSuccess]) {    
            // 调用成功    
        }    
}];
#include "HiveAuthV4.h"

// 已登录用户的 PlayerId
int64 PlayerId = 12345;

FHiveAuthV4::ShowProfile(PlayerId, FHiveAuthV4OnShowProfileDelegate::CreateLambda([this](const FHiveResultAPI& Result) {
        if (Result.IsSuccess()) {
                // Call succeeded
        }
}));


个人资料屏幕的使用基本上由开发者自行决定。然而,如果您提供一个 Hive Membership IdP,您 必须实现 showProfile() 这是因为 Hive 会员在个人资料屏幕的 Hive 账户设置中提供了密码更改和注销功能,如下所示。

Hive 会员身份提供者集成状态配置文件 客人及其他身份提供者集成状态配置文件


即使 Hive 仅提供除会员 IdP 之外的 IdP,显示个人资料屏幕也可以提供诸如阻止海外登录、完全注销和检查登录历史等安全功能。因此,建议使用 showProfile() 实现个人资料屏幕的显示。

Note

当与返回个人资料图片和昵称的身份提供者(如 Facebook)集成时,该身份提供者提供的图片和昵称将自动加载到个人资料中。

用户资料检查

当用户登录时,您可以通过调用 AuthV4 类的 getProfile() 方法来获取用户资料数据。资料数据包含 playerId、用于显示名称的 playerName 和用户缩略图的 playerImageUrl

以下是接收个人资料数据的示例代码。

API 参考: hive.AuthV4.getProfile

使用蜂巢;

List<Int64> playerIdList = new List();
playerIdList.Add(0123);
playerIdList.Add(4567);

AuthV4.getProfile(playerIdList, (ResultAPI result, List profileInfoList) => {
    if (!result.isSuccess()) {
return;
    }

    if (profileInfoList != null) {
        foreach (ProfileInfo profileInfo in profileInfoList) {
        // PlayerName: profileInfo.playerName
        // PlayerId: profileInfo.playerId
        }
    }
});
#include "HiveAuthV4.h"

TArray<int64> PlayerIdArray;
PlayerIdArray.Add(1234);
PlayerIdArray.Add(5678);

FHiveAuthV4::GetProfile(PlayerIdArray, FHiveAuthV4OnGetProfileDelegate::CreateLambda([this](const FHiveResultAPI& Result, const TArray<FHiveProfileInfo> ProfileInfoArray) {
        if (!Result.IsSuccess()) {
                return;
        }

        for (const auto& ProfileInfo : ProfileInfoArray)
        {
                // PlayerName: ProfileInfo.PlayerName;
                // PlayerId : ProfileInfo.ProfileInfo;
        }
}));

API 参考: AuthV4::getProfile

#include <HIVE_SDK_Plugin/HIVE_CPP.h>
using namespace std;
using namespace hive;

vector<PlayerID> playerIdList;
playerIdList.push_back(0123);
playerIdList.push_back(4567);

AuthV4::getProfile(playerIdList, [=](ResultAPI const & result, vector<ProfileInfo> const & profileInfoList) {
    if (!result.isSuccess()) {
return;
}

if (profileInfoList != null) {
    for (auto profileInfo : profileInfoList) {
        // PlayerName: profileInfo.playerName
        // PlayerId: profileInfo.playerId
        }
    }
});

API 参考: AuthV4.getProfile

import com.hive.AuthV4
import com.hive.ResultAPI

val playerIdList = arrayListOf<Long>(
    1234,
    4567
)

AuthV4.getProfile(playerIdList, object : AuthV4.AuthV4GetProfileListener {
    override fun onAuthV4GetProfile(result: ResultAPI, profileInfoList: ArrayList<AuthV4.ProfileInfo>?) {
        if (!result.isSuccess) {
            return
        }

        if (profileInfoList != null) {
            for (i in 0 until profileInfoList.size) {
                // PlayerName: profileInfoList[i].playerName
                // PlayerId: profileInfoList[i].playerId
            }
        }
    }
})

API 参考: com.hive.AuthV4.getProfile

import com.hive.AuthV4;
import com.hive.ResultAPI;

ArrayList<Long> playerIdList = new ArrayList<>(Arrays.asList(
        1234L,
        5678L
));

AuthV4.INSTANCE.getProfile(playerIdList, (result, profileInfoList) -> {
    if (!result.isSuccess()) {
        return;
    }

    if (profileInfoList != null) {
        for (AuthV4.ProfileInfo profileInfo : profileInfoList) {
            // PlayerName: profileInfo.getPlayerName();
            // PlayerId: profileInfo.getPlayerId();
        }
    }
});

API 参考: AuthV4Interface.getProfile

import HIVEService

var playerIdList = [Int64]()
playerIdList.append(0123)
playerIdList.append(4567)

AuthV4Interface.getProfile(playerIdList) { result, profileInfoList in
    if !result.isSuccess() {
    return
    }

    if let profileInfoList = profileInfoList {
        for (profileInfo in profileInfoList) {
        // PlayerName: profileInfo.playerName
        // PlayerId: profileInfo.playerId
        }
    }
}

API Reference: HIVEAuthV4:getProfile

#import <HIVEService/HIVEService-Swift.h>

NSMutableArray<NSNumber *> *playerIdList = [[[NSMutableArray] alloc] init];
[playerIdList addObject: [NSNumber numberWithLongLong:0123]];
[playerIdList addObject: [NSNUmber numberWithLongLong:4567]];

[HIVEAuthV4 getProfile: playerIdList handler: ^(HIVEResultAPI *result, NSArray<HIVEProfileInfo *> *profileInfoList) {
    if (![result isSuccess]) {
    return;
    }
    if (profileInfoList != nil) {
        for (HIVEProfileInfo *profileInfo in profileInfoList) {
        // PlayerName: profileInfo.playerName
        // PlayerId: profileInfo.playerId
        }
    }
}];

检查黑名单

当用户登录或与身份提供者(IdP)同步时,Hive SDK 会自动检查黑名单并暂停用户的游戏。如果您需要在游戏中检查用户暂停的状态,请使用 checkBlacklist() 方法实时检查用户的暂停状态并限制游戏玩法。根据 checkBlacklist() 调用时 isShow 参数的值,Hive SDK 将直接显示暂停状态弹出窗口或返回用于自定义暂停状态弹出窗口的内容。

  • 使用提供的悬浮弹窗:将 isShow 参数设置为 true
  • 使用自定义悬浮弹窗:将 isShow 参数设置为 false。有关弹窗数据的更多信息,请参见下面的 Hive SDK 返回的悬浮弹窗数据

  • 暂停弹窗的示例屏幕

Hive SDK 返回的暂停弹窗数据

如果调用 checkBlacklist() 方法的结果成功,Hive SDK 将通过 AuthV4MaintenanceInfo 对象返回以下表格中的值。

字段名称 描述 类型
title 弹出窗口标题 字符串
message 弹出窗口内容 字符串
button 弹出窗口按钮上的文本 字符串
action 用户点击弹出窗口按钮时的操作类型
* OPEN_URL: 执行外部浏览器传递的 URL
* EXIT: 结束应用程序
* DONE: 仅关闭维护弹出窗口
AuthV4MaintenanceActionType 的枚举类型
url 外部浏览器显示的 URL。当 action 字段的值为 OPEN_URL 时有效 字符串
remainingTime 维护完成前的剩余时间(单位:秒)。时间实时刷新,当变为零时,应用程序终止。 整数

以下是检查被暂停用户的示例代码。

  • 在不使用 Hive SDK UI 的情况下 (isShow = false)

API 参考: hive.AuthV4.checkBlacklist

using hive;

Boolean isShow = false;

AuthV4.checkBlacklist(isShow, (ResultAPI result, List<AuthV4.MaintenanceInfo> maintenanceInfo) => {
    if (!result.isSuccess()) {
        // 请求检查暂停失败
        return;
    }

    if(maintenanceInfo != null){
        // In case of suspended user
    } else{
        // If you are a general user
    }
});
#include "HiveAuthV4.h"

bool bIsShow = false;
FHiveAuthV4::CheckBlacklist(bIsShow,
                                                            FHiveAuthV4OnMaintenanceInfoDelegate::CreateLambda([this](const FHiveResultAPI& Result, const TArray<FHiveAuthV4MaintenanceInfo>& AuthV4MaintenanceInfoArray) {
        if (!Result.IsSuccess()) {
                // 请求检查暂停失败
                return;
        }

        if (AuthV4MaintenanceInfoArray.Num() > 0) {
                //  如果是暂停的用户
        } else {
                // 如果您是普通用户
        }
}));

API 参考: AuthV4.checkBlacklist

#include <HIVE_SDK_Plugin/HIVE_CPP.h>
using namespace std;
using namespace hive;

bool isShow = false;

AuthV4::checkBlacklist(isShow, [=](ResultAPI const & result, vector<AuthV4MaintenanceInfo> const & maintenanceInfo) {
    if(!result.isSuccess) {
        // 请求检查暂停失败
        return;
    }

    if (maintenanceInfo != null){
        // In case of suspended user
    } else {
        // If you are a general user
    }
});

API Reference: AuthV4.checkBlacklist

    import com.hive.AuthV4
    import com.hive.ResultAPI

    val isShow = false

    AuthV4.checkBlacklist(isShow, object : AuthV4.AuthV4MaintenanceListener {
        override fun onAuthV4Maintenance(result: ResultAPI, maintenanceInfo: ArrayList<AuthV4.AuthV4MaintenanceInfo>?) {
            if (!result.isSuccess) {
                // 请求检查暂停失败
                return
            }

            if (maintenanceInfo != null) {
                // In case of suspended user
            } else {
                // If you are a general user
            }
        }
    })

API 参考: com.hive.AuthV4.checkBlacklist

    import com.hive.AuthV4;
    import com.hive.ResultAPI;

    boolean isShow = false;

    AuthV4.INSTANCE.checkBlacklist(isShow, (result, maintenanceInfo) -> {
        if (!result.isSuccess()) {
            // 请求检查暂停失败
            return;
        }

        if (maintenanceInfo != null) {
            // In case of suspended user
        } else {
            // If you are a general user
        }
    });

API 参考: AuthV4Interface.checkBlacklist

    import HIVEService

    let isShow = false

    AuthV4Interface.checkBlacklist(isShow) { result, maintenanceInfo in
        if !result.isSuccess() {
        // 请求检查暂停失败
            return
        }

        如果 let maintenanceInfo = maintenanceInfo {
        // 针对暂停的用户
        } else {
        // 如果您是普通用户
        }
    }

API 参考: HIVEAuthV4:checkBlacklist

    #import <HIVEService/HIVEService-Swift.h>

    BOOL isShow = NO;

    [HIVEAuthV4 checkBlackList: isShow handler: ^(HIVEResultAPI *result, HIVEAuthV4MaintenanceInfo *maintenanceInfo) {
        if (![result isSuccess]) {
        // 请求检查暂停失败
        return;
        }

        if (maintenanceInfo != nil) {
        // In case of suspended user
        } else {
        // If you are a general user
        }
    }];
  • 在使用 Hive SDK UI (isShow = true) 的情况下

API 参考: hive.AuthV4.checkBlacklist

// 如果 isShow 为 true,Hive SDK 显示悬浮弹窗。
    Boolean isShow = true;

    // Hive SDK AuthV4 请求检查用户是否被暂停。
    AuthV4.checkBlacklist(isShow, (ResultAPI result, List<AuthV4.MaintenanceInfo> maintenanceInfo)=>{
    if (result.isSuccess()) {
        // 正常用户的情况
    }    else if (result.needExit()) {

    // TODO: 实现应用程序的终止。
     // 示例) Application.Quit();    }});
#include "HiveAuthV4.h"

// 如果 isShow 为真,Hive SDK 显示悬浮弹窗。
bool bIsShow = true;

// Hive SDK AuthV4 请求检查用户是否被暂停。
FHiveAuthV4::CheckBlacklist(bIsShow,
                                                            FHiveAuthV4OnMaintenanceInfoDelegate::CreateLambda([this](const FHiveResultAPI& Result, const TArray<FHiveAuthV4MaintenanceInfo>& AuthV4MaintenanceInfoArray) {
        if (Result.IsSuccess()) {
                // 正常用户的情况
        } else if (Result.NeedExit() {
                // TODO: 实现应用程序的终止。
                // 例如) UKismetSystemLibrary::QuitGame(GetWorld(), nullptr, EQuitPreference::Quit, false);
        }
}));

API 参考: AuthV4.checkBlacklist

// 如果 isShow 为真,Hive SDK 显示悬浮弹窗。
    bool isShow = true;

    // Hive SDK AuthV4 请求检查用户是否被暂停。
    AuthV4::checkBlacklist(isShow,  [=](ResultAPI const & result,std::vector<AuthV4MaintenanceInfo> const & maintenanceInfolist){
    if (result.isSuccess()) {
        // 正常用户的情况
    }    else if (result.needExit()) {
        // TODO: 实现应用程序的终止。
        // Cocos2d-x 引擎的用户
        // 例如) exit(0);
        // 虚幻引擎用户
        // 示例) UKismetSystemLibrary::QuitGame(GetWorld(), nullptr, EQuitPreference::Quit, false);    }});

API 参考: AuthV4.checkBlacklist

// 如果 isShow 为 true,Hive SDK 显示悬浮弹窗。
    val isShow = true

 // Hive SDK AuthV4 请求检查用户是否被暂停。
AuthV4.checkBlacklist(isShow, object : AuthV4.AuthV4MaintenanceListener {
 override fun onAuthV4Maintenance(
result: ResultAPI,
maintenanceInfo: ArrayList<AuthV4.AuthV4MaintenanceInfo>?    ) {        if (result.isSuccess) {
    // 正常用户的情况
} else if (result.needExit()) {
    // TODO: 实现应用程序的终止。
    // 示例) exitProcess(0)        }    }})

API 参考: com.hive.AuthV4.checkBlacklist

// 如果 isShow 为 true,Hive SDK 显示悬浮弹窗。
boolean isShow = true;

// Hive SDK AuthV4 请求检查用户是否被暂停。
AuthV4.checkBlacklist(isShow, new AuthV4.AuthV4MaintenanceListener() {
@Override
public void onAuthV4Maintenance(ResultAPI result, ArrayList<AuthV4.AuthV4MaintenanceInfo> maintenanceInfo) {
    if (result.isSuccess()) {
        // 正常用户的情况
    }        else if (result.needExit()) {
        // TODO: 实现应用程序的终止。
        // 示例) System.exit(0);        }    }});

API 参考: AuthV4Interface.checkBlacklist

// 如果 isShow 为 true,Hive SDK 显示悬浮弹窗。
    let isShow = true

// Hive SDK AuthV4 请求以检查用户是否被暂停。
AuthV4Interface.checkBlacklist(isShow) { (result, maintenanceInfolist) in
if result.isSuccess() {
    // 正常用户的情况
}
else if result.needExit() {
    // TODO: 实现应用程序的终止。
    // 示例) exit(0) 
}

API 参考: HIVEAuthV4:checkBlacklist

// 如果 isShow 为 YES,Hive SDK 显示悬浮弹窗。
    BOOL isShow = YES;

// Hive SDK AuthV4 请求检查用户是否被暂停。
[HIVEAuthV4 checkBlacklist:isShow handler:^(HIVEResultAPI *result, NSArray<HIVEAuthV4MaintenanceInfo *> *maintenanceInfolist) {
if (result.isSuccess) {
    // 正常用户的情况
}    else if (result.needExit) {
    // TODO: 实现应用程序的终止。
    // 示例) exit(0);             }}];

使用用户的电子邮件地址

游戏公司提供一个功能,用于收集登录用户个人资料中的电子邮件信息。要收集电子邮件信息,您必须在 Hive 控制台中启用该功能。

首先,您必须从下面的IDP列表中获得“可以收集电子邮件的IDP”的许可,以收集电子邮件。

  • 可用于电子邮件收集的身份提供者:Google、Facebook、华为(Android)、会员、Apple(iOS)
  • 无法从身份提供者收集电子邮件:Google Play 游戏、Apple 游戏中心、QQ、VK、微信、Line、Weverse, Steam, X


<

在调用显式登录API后,您可以通过引用PlayerInfo类实例中的providerInfoData来获取已登录用户的电子邮件地址,该实例在回调中返回。

providerInfoData中使用ProviderType作为键以获取ProviderInfo。有关更多详细信息,请参见下面的示例代码。

API 参考: hive.AuthV4.showSignIn

// 请求 Hive SDK AuthV4 认证 UI
AuthV4.showSignIn((ResultAPI result, AuthV4.PlayerInfo playerInfo)=>{
if (result.isSuccess()) {
    // 认证成功
    // playerInfo: 认证用户信息

    // 获取电子邮件信息的示例
    foreach (KeyValuePair<AuthV4.ProviderType , AuthV4.ProviderInfo> entry in playerInfo.providerInfoData) {

        AuthV4.ProviderInfo providerInfo = entry.Value;
        if(providerInfo.providerEmail != null && providerInfo.providerEmail != "") {
            string email = providerInfo.providerEmail;
            break;
         }        
        }    
    }    
    else if (result.needExit()) {
        // TODO: 实现应用程序的终止
        // 示例) Application.Quit();    
    }
});
#include "HiveAuthV4.h"

// 请求 Hive SDK AuthV4 认证 UI
FHiveAuthV4::ShowSignIn(FHiveAuthV4OnSignInDelegate::CreateLambda([this](const FHiveResultAPI& Result, const FHivePlayerInfo& PlayerInfo) {
        if (Result.IsSuccess()) {
                // 认证成功
      // playerInfo: 认证用户信息

                // 获取电子邮件信息的示例
                for (const auto& ProviderInfoEntry : PlayerInfo.ProviderInfoData) {
                        FHiveProviderInfo ProviderInfo = ProviderInfoEntry.Value;
                        FString Email = ProviderInfo.ProviderEmail;
                }
        } else if (Result.NeedExit()) {
                 // TODO: 实现应用程序的终止
      // Cocos2d-x 引擎的用户
      // 例如) UKismetSystemLibrary::QuitGame(GetWorld(), nullptr, EQuitPreference::Quit, false);
        }
}));

API 参考: AuthV4::showSignIn

// 请求 Hive SDK AuthV4 认证 UI
AuthV4::showSignIn([=](ResultAPI const & result, PlayerInfo const & playerInfo) {
    if (result.isSuccess()) {
        // 认证成功
        // playerInfo: 认证用户信息

        // 获取电子邮件信息的示例
        for(auto it = playerInfo.providerInfoData.begin(); it != playerInfo.providerInfoData.end(); ++it) {
            hive::ProviderInfo providerInfo = it->second;
            if(!providerInfo.providerEmail.empty()) {
                std::string email = providerInfo.providerEmail;
                break;
            }
        }
    }
    else if (result.needExit()) {
        // TODO: 实现应用程序的终止
        // Cocos2d-x 引擎的用户
        // 例如) exit(0);
        // 虚幻引擎用户
        // 示例) UKismetSystemLibrary::QuitGame(GetWorld(), nullptr, EQuitPreference::Quit, false);
    }
});

API 参考: com.hive.AuthV4.showSignIn

// 请求 Hive SDK AuthV4 认证 UI
AuthV4.showSignIn(object : AuthV4.AuthV4SignInListener{
override fun onAuthV4SignIn(result: ResultAPI, playerInfo: AuthV4.PlayerInfo?) {
    if (result.isSuccess) {
        // 认证成功
        // playerInfo: 认证用户信息

        // 获取电子邮件信息的示例
        playerInfo?.let {
            for ((key, value) in it.providerInfoData) {
                var providerInfo: AuthV4.ProviderInfo = value
                if(providerInfo.providerEmail.isNotEmpty()) {
                    val email = providerInfo.providerEmail
                    break
                }
            }
        }
    } else if (result.needExit()) {
            // TODO: 实现应用程序的终止
            // ex) exitProcess(0)
        }
    }
})

API 参考: com.hive.AuthV4.showSignIn

// 请求 Hive SDK AuthV4 认证 UI
AuthV4.showSignIn(new AuthV4.AuthV4SignInListener() {
    @Override
    public void onAuthV4SignIn(ResultAPI result, AuthV4.PlayerInfo playerInfo) {

        if (result.isSuccess()) {
            // 认证成功
            // playerInfo: 经过认证的用户信息

            // 获取电子邮件信息的示例
            if(playerInfo != null) {
                for (Map.Entry<AuthV4.ProviderType , AuthV4.ProviderInfo> entry : playerInfo.getProviderInfoData().entrySet()) {
                    AuthV4.ProviderInfo providerInfo = entry.getValue();
                    if (providerInfo.getProviderEmail() != "") {
                        String email = providerInfo.getProviderEmail();
                        break;
                    }                
                }            
            }        
        }        
        else if (result.needExit()) {
            // TODO: 实现应用程序的终止
            // 示例) System.exit(0);        
        }    
    }
});

API 参考: HIVEAuthV4:showSignIn

var email = String()

// 请求 Hive SDK AuthV4 认证 UI
AuthV4Interface.showSignIn { (result, playerInfo) in

    如果 result.isSuccess() {
        // 认证成功
        // playerInfo: 认证用户信息

        // 获取电子邮件信息的示例
        if let playerInfo = playerInfo {
            // 查找提供者信息,其中存在提供者电子邮件(当前登录的提供者)
            for key in playerInfo.providerInfoData.keys {
                if let providerInfo = playerInfo.providerInfoData[key],
                providerInfo.providerEmail.count > 0 {
                    // providerEmail != ""
                    email = providerInfo.providerEmail
                    break
                }
            }
        }
    } else if result.needExit() {
        // TODO: 实现应用程序的终止
        // 示例)exit(0)
    }
} 

API 参考: HIVEAuthV4:showSignIn

__block NSString* email = @"";

// 请求 Hive SDK AuthV4 认证 UI
[HIVEAuthV4 showSignIn:^(HIVEResultAPI *result, HIVEPlayerInfo *playerInfo) {

    if([result isSuccess]){
        // 认证成功
        // playerInfo: 认证用户信息

        // 获取电子邮件信息的示例
        if(playerInfo != nil) {
            // 查找存在providerEmail的providerInfo(当前登录的提供者)
            for (NSString* key in playerInfo.providerInfoData.allKeys) {
                HIVEProviderInfo* providerInfo = playerInfo.providerInfoData[key];
                if (providerInfo != nil && providerInfo.providerEmail.length > 0) {
                    // providerEmail != ""
                    email = providerInfo.providerEmail;
                    break;
                }
            }
        }
    } else if ([result needExit]) {
        // TODO: 实现应用程序的终止
        // ex) exit(0);
    }
}];
Note

客户登录和自定义登录在ProviderInfo中没有电子邮件信息。它作为一个空字符("")返回。

如果没有用户电子邮件信息,则ProviderInfo中的电子邮件信息将作为空字符("")返回。