BMXClient Class Reference

Inherits from BMXNetworkListener :
NSObject
Declared in floo_proxy.h

Overview

@interface 客户端实例

Properties

chatService

@property (nonatomic, strong, readonly) BMXChatService *chatService

groupService

@property (nonatomic, strong, readonly) BMXGroupService *groupService

pushService

@property (nonatomic, strong, readonly) BMXPushService *pushService

rosterService

@property (nonatomic, strong, readonly) BMXRosterService *rosterService

rtcService

@property (nonatomic, strong, readonly) BMXRTCService *rtcService

userService

@property (nonatomic, strong, readonly) BMXUserService *userService

Class Methods

createWithConfig:

创建BMXClient

+ (BMXClient *)createWithConfig:(BMXSDKConfig *)*config*

Parameters

config
客户端本地已经创建好的BMXSDKConfig SDK配置对象

Return Value

BMXClient

Declared In

  • floo_proxy.h

Example:

sharedClient

+ (instancetype)sharedClient

Instance Methods

Example:

changeAppIdWithAppId:

- (BMXErrorCode)changeAppIdWithAppId:(NSString *)*appId*

Example:

changeAppIdWithAppId:appSecret:

更改SDK的appId,本操作会同时更新BMXConfig中的appId。

- (BMXErrorCode)changeAppIdWithAppId:(NSString *)*appId* appSecret:(NSString *)*appSecret*

Parameters

appId
新变更的appId

Return Value

BMXErrorCode

Declared In

  • floo_proxy.h

Example:

changeAppIdWithAppId:appSecret:completion:

更改SDK的appId,本操作会同时更新BMXConfig中的appId。

- (void)changeAppIdWithAppId:(NSString *)*appId* appSecret:(NSString *)*appSecret* completion:(void ( ^ ) ( BMXError *aError ))*resBlock*

Parameters

appId
新变更的appId

Return Value

BMXErrorCode

Declared In

  • floo_proxy.h

Example:

changeAppIdWithAppId:completion:

- (void)changeAppIdWithAppId:(NSString *)*appId* completion:(void ( ^ ) ( BMXError *aError ))*resBlock*

Example:

connectStatus

获取当前和服务器的连接状态

- (BMXConnectStatus)connectStatus

Return Value

BMXConnectStatus

Declared In

  • floo_proxy.h

Example:

dealloc

- (void)dealloc

Example:

deleteAccountWithPassword:

删除账号

- (BMXErrorCode)deleteAccountWithPassword:(NSString *)*password*

Parameters

password
密码

Return Value

BMXErrorCode

Declared In

  • floo_proxy.h

Example:

deleteAccountWithPassword:completion:

删除账号

- (void)deleteAccountWithPassword:(NSString *)*password* completion:(void ( ^ ) ( BMXError *aError ))*resBlock*

Parameters

password
密码

Return Value

BMXErrorCode

Declared In

  • floo_proxy.h

Example:

disconnect

断开网络连接

- (void)disconnect

Declared In

  • floo_proxy.h

Example:

disconnectWithCompletion:

断开网络连接

- (void)disconnectWithCompletion:(void ( ^ ) ( BMXError *aError ))*resBlock*

Declared In

  • floo_proxy.h

Example:

fastSignInByIdWithUid:password:

通过用户ID快速登录(要求之前成功登录过,登录速度较快)

- (BMXErrorCode)fastSignInByIdWithUid:(long long)*uid* password:(NSString *)*password*

Parameters

uid
用户id

password
用户密码(用于sdk在内部token到期时自动更新用户token)

Return Value

BMXErrorCode

Declared In

  • floo_proxy.h

Example:

fastSignInByIdWithUid:password:completion:

通过用户ID快速登录(要求之前成功登录过,登录速度较快)

- (void)fastSignInByIdWithUid:(long long)*uid* password:(NSString *)*password* completion:(void ( ^ ) ( BMXError *aError ))*resBlock*

Parameters

uid
用户id

password
用户密码(用于sdk在内部token到期时自动更新用户token)

Return Value

BMXErrorCode

Declared In

  • floo_proxy.h

Example:

fastSignInByNameWithName:password:

通过用户名快速登录(要求之前成功登录过,登录速度较快)

- (BMXErrorCode)fastSignInByNameWithName:(NSString *)*name* password:(NSString *)*password*

Parameters

name
用户名

password
用户密码(用于sdk在内部token到期时自动更新用户token)

Return Value

BMXErrorCode

Declared In

  • floo_proxy.h

Example:

fastSignInByNameWithName:password:completion:

通过用户名快速登录(要求之前成功登录过,登录速度较快)

- (void)fastSignInByNameWithName:(NSString *)*name* password:(NSString *)*password* completion:(void ( ^ ) ( BMXError *aError ))*resBlock*

Parameters

name
用户名

password
用户密码(用于sdk在内部token到期时自动更新用户token)

Return Value

BMXErrorCode

Declared In

  • floo_proxy.h

Example:

getSDKConfig

获取SDK设置

- (BMXSDKConfig *)getSDKConfig

Return Value

BMXSDKConfig

Declared In

  • floo_proxy.h

Example:

initializeServerConfigWithIsLocal:

获取app的服务器网络配置,在初始化SDK之后登陆之前调用,可以提前获取服务器配置加快登陆速度。

- (BMXErrorCode)initializeServerConfigWithIsLocal:(BOOL)*isLocal*

Parameters

isLocal
为true则使用本地缓存的dns配置,为false则从服务器获取最新的配置。

Return Value

BMXErrorCode

Declared In

  • floo_proxy.h

Example:

initializeServerConfigWithIsLocal:completion:

获取app的服务器网络配置,在初始化SDK之后登陆之前调用,可以提前获取服务器配置加快登陆速度。

- (void)initializeServerConfigWithIsLocal:(BOOL)*isLocal* completion:(void ( ^ ) ( BMXError *aError ))*resBlock*

Parameters

isLocal
为true则使用本地缓存的dns配置,为false则从服务器获取最新的配置。

Return Value

BMXErrorCode

Declared In

  • floo_proxy.h

Example:

onNetworkChangedWithType:reconnect:

处理网络状态发送变化

- (void)onNetworkChangedWithType:(BMXNetworkType)*type* reconnect:(BOOL)*reconnect*

Parameters

type
变化后的网络类型

reconnect
网络是否需要重连

Declared In

  • floo_proxy.h

Example:

reconnect

强制重新连接

- (void)reconnect

Declared In

  • floo_proxy.h

Example:

reconnectWithCompletion:

强制重新连接

- (void)reconnectWithCompletion:(void ( ^ ) ( BMXError *aError ))*resBlock*

Declared In

  • floo_proxy.h

Example:

sendMessageWithMsg:

发送消息,消息状态变化会通过listener通知,在发送群组消息且指定的群组为开启群组已读回执的情况下, 该接口会自动获取群成员列表id并且填充到message config中去,无需客户端自己进行群组成员列表的填充操作。

- (void)sendMessageWithMsg:(BMXMessage *)*msg*

Parameters

msg
发送的消息

Declared In

  • floo_proxy.h

Example:

sendMessageWithMsg:completion:

发送消息,消息状态变化会通过listener通知,在发送群组消息且指定的群组为开启群组已读回执的情况下, 该接口会自动获取群成员列表id并且填充到message config中去,无需客户端自己进行群组成员列表的填充操作。

- (void)sendMessageWithMsg:(BMXMessage *)*msg* completion:(void ( ^ ) ( BMXError *aError ))*resBlock*

Parameters

msg
发送的消息

Declared In

  • floo_proxy.h

Example:

signInByIdWithArg1:password:

通过用户名登录

- (BMXErrorCode)signInByIdWithArg1:(long long)*arg1* password:(NSString *)*password*

Parameters

password
用户密码

name
用户名

Return Value

BMXErrorCode

Declared In

  • floo_proxy.h

Example:

signInByIdWithArg1:password:completion:

通过用户ID登录

- (void)signInByIdWithArg1:(long long)*arg1* password:(NSString *)*password* completion:(void ( ^ ) ( BMXError *aError ))*resBlock*

Parameters

password
用户密码

int64_t
用户id

Return Value

BMXErrorCode

Declared In

  • floo_proxy.h

Example:

signInByNameWithName:password:

通过用户名登录

- (BMXErrorCode)signInByNameWithName:(NSString *)*name* password:(NSString *)*password*

Parameters

name
用户名

password
用户密码

Return Value

BMXErrorCode

Declared In

  • floo_proxy.h

Example:

signInByNameWithName:password:completion:

通过用户名登录

- (void)signInByNameWithName:(NSString *)*name* password:(NSString *)*password* completion:(void ( ^ ) ( BMXError *aError ))*resBlock*

Parameters

name
用户名

password
用户密码

Return Value

BMXErrorCode

Declared In

  • floo_proxy.h

Example:

signInStatus

获取当前的登录状态

- (BMXSignInStatus)signInStatus

Return Value

BMXSignInStatus

Declared In

  • floo_proxy.h

Example:

signOut

- (BMXErrorCode)signOut

Example:

signOutWithCompletion:

- (void)signOutWithCompletion:(void ( ^ ) ( BMXError *aError ))*resBlock*

Example:

signOutWithUid:

- (BMXErrorCode)signOutWithUid:(long long)*uid*

Example:

signOutWithUid:completion:

- (void)signOutWithUid:(long long)*uid* completion:(void ( ^ ) ( BMXError *aError ))*resBlock*

Example:

signOutWithUid:ignoreUnbindDevice:

退出登录

- (BMXErrorCode)signOutWithUid:(long long)*uid* ignoreUnbindDevice:(BOOL)*ignoreUnbindDevice*

Parameters

uid
退出用户的uid(默认输入0则退出当前登陆用户)

ignoreUnbindDevice
用户退出时是否忽略解绑定设备操作。对应某些服务器不可访问的情况下忽略服务器解绑定设备操作直接强制退出时设置为true

Return Value

BMXErrorCode

Declared In

  • floo_proxy.h

Example:

signOutWithUid:ignoreUnbindDevice:completion:

退出登录

- (void)signOutWithUid:(long long)*uid* ignoreUnbindDevice:(BOOL)*ignoreUnbindDevice* completion:(void ( ^ ) ( BMXError *aError ))*resBlock*

Parameters

uid
退出用户的uid(默认输入0则退出当前登陆用户)

ignoreUnbindDevice
用户退出时是否忽略解绑定设备操作。对应某些服务器不可访问的情况下忽略服务器解绑定设备操作直接强制退出时设置为true

Return Value

BMXErrorCode

Declared In

  • floo_proxy.h

Example:

signUpNewUserWithUsername:password:bmxUserProfilePtr:

注册新用户,username和password是必填参数

- (BMXErrorCode)signUpNewUserWithUsername:(NSString *)*username* password:(NSString *)*password* bmxUserProfilePtr:(BMXUserProfile *)*bmxUserProfilePtr*

Parameters

username
用户名

password
用户密码

bmxUserProfilePtr
注册成功后从该函数处获取新注册用户的Profile信息,初始传入指向为空的shared_ptr对象即可。

Return Value

BMXErrorCode

Declared In

  • floo_proxy.h

Example:

signUpNewUserWithUsername:password:completion:

注册新用户,username和password是必填参数

- (void)signUpNewUserWithUsername:(NSString *)*username* password:(NSString *)*password* completion:(void ( ^ ) ( BMXUserProfile *profile , BMXError *aError ))*resBlock*

Parameters

username
用户名

password
用户密码

bmxUserProfilePtr
注册成功后从该函数处获取新注册用户的Profile信息,初始传入指向为空的shared_ptr对象即可。

Return Value

BMXErrorCode

Declared In

  • floo_proxy.h

Example:

© 2019-2024 美信拓扑 | 官网 | 网站地图 该文件修订时间: 2024-09-26 03:17:35

results matching ""

    No results matching ""