tencent cloud

定制用户属性
最后更新时间:2024-07-03 18:14:36
定制用户属性
最后更新时间: 2024-07-03 18:14:36
宿主应用开发者可以通过 SDK 提供的方法设置用户的昵称和头像信息。

设置用户昵称

/**
* @brief SDK宿主平台的用户昵称,默认返回"TCMPP" - The user nickname of the SDK host platform, which returns "TCMPP" by default
*/
- (NSString *)getAppNickName;

设置用户头像

/**
* @brief SDK宿主平台的用户头像,默认返回demo图片 - SDK host platform user avatar, returns demo image by default
*/
- (UIImage *)getAppAvatar;

获取当前用户账号标识

/**
* @brief 获取SDK宿主平台的当前用户账号标识,一般填uin或openid - Get the current user account ID of the SDK host platform, usually fill in uin or openid
*
* 注意:返回nil会导致SDK内某些缓存失效。如果没有登录,可以填个设备号id来避免缓存失效 - Note: Returning nil will cause some caches in the SDK to become invalid. If you are not logged in, you can fill in the device ID to avoid cache failure.
*/
- (NSString *_Nonnull)getAppUID;

本页内容是否解决了您的问题?
您也可以 联系销售 提交工单 以寻求帮助。

文档反馈