BMXClient Class Reference#
Inherits from BMXNetworkListener :
NSObject
Declared in floo_proxy.h
Overview#
@interface Client instance
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:#
Create a BMXClient
+ (BMXClient )createWithConfig:(BMXSDKConfig )config
Parameters#
config
BMXSDKConfig SDK config created
Return Value#
BMXClient
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXClient",function="createWithConfig:" %}{% endlanying_code_snippet %}
sharedClient#
+ (instancetype)sharedClient
Instance Methods#
{% lanying_code_snippet repo="lanying-im-ios",class="BMXClient",function="sharedClient" %}{% endlanying_code_snippet %}
changeAppIdWithAppId:#
- (BMXErrorCode)changeAppIdWithAppId:(NSString )appId*
{% lanying_code_snippet repo="lanying-im-ios",class="BMXClient",function="changeAppIdWithAppId:" %}{% endlanying_code_snippet %}
changeAppIdWithAppId:appSecret:#
Change appId,also works on appId in BMXConfig
- (BMXErrorCode)changeAppIdWithAppId:(NSString )appId appSecret:(NSString )appSecret
Parameters#
appId
The new appId
Return Value#
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXClient",function="changeAppIdWithAppId:appSecret:" %}{% endlanying_code_snippet %}
changeAppIdWithAppId:appSecret:completion:#
Change appId,also works on appId in BMXConfig
- (void)changeAppIdWithAppId:(NSString )appId appSecret:(NSString )appSecret completion:(void ( ^ ) ( BMXError aError ))resBlock*
Parameters#
appId
The new appId
Return Value#
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXClient",function="changeAppIdWithAppId:appSecret:completion:" %}{% endlanying_code_snippet %}
changeAppIdWithAppId:completion:#
- (void)changeAppIdWithAppId:(NSString )appId completion:(void ( ^ ) ( BMXError aError ))resBlock
{% lanying_code_snippet repo="lanying-im-ios",class="BMXClient",function="changeAppIdWithAppId:completion:" %}{% endlanying_code_snippet %}
connectStatus#
Get connection status to the server
- (BMXConnectStatus)connectStatus
Return Value#
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXClient",function="connectStatus" %}{% endlanying_code_snippet %}
dealloc#
- (void)dealloc
{% lanying_code_snippet repo="lanying-im-ios",class="BMXClient",function="dealloc" %}{% endlanying_code_snippet %}
deleteAccountWithPassword:#
Delete my account
- (BMXErrorCode)deleteAccountWithPassword:(NSString )password*
Parameters#
password
The password for my account
Return Value#
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXClient",function="deleteAccountWithPassword:" %}{% endlanying_code_snippet %}
deleteAccountWithPassword:completion:#
Delete my account
- (void)deleteAccountWithPassword:(NSString )password completion:(void ( ^ ) ( BMXError aError ))resBlock
Parameters#
password
The password for my account
Return Value#
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXClient",function="deleteAccountWithPassword:completion:" %}{% endlanying_code_snippet %}
disconnect#
Disconnect from the server
- (void)disconnect
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXClient",function="disconnect" %}{% endlanying_code_snippet %}
disconnectWithCompletion:#
Disconnect from the server
- (void)disconnectWithCompletion:(void ( ^ ) ( BMXError aError ))resBlock*
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXClient",function="disconnectWithCompletion:" %}{% endlanying_code_snippet %}
fastSignInByIdWithUid:password:#
Fast login by user ID (A successful login required)
- (BMXErrorCode)fastSignInByIdWithUid:(long long)uid password:(NSString )password*
Parameters#
uid
User ID
password
The password
Return Value#
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXClient",function="fastSignInByIdWithUid:password:" %}{% endlanying_code_snippet %}
fastSignInByIdWithUid:password:completion:#
Fast login by user ID (A successful login required)
- (void)fastSignInByIdWithUid:(long long)uid password:(NSString )password completion:(void ( ^ ) ( BMXError aError ))resBlock
Parameters#
uid
User ID
password
The password
Return Value#
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXClient",function="fastSignInByIdWithUid:password:completion:" %}{% endlanying_code_snippet %}
fastSignInByNameWithName:password:#
Fast login by username (A successful login required)
- (BMXErrorCode)fastSignInByNameWithName:(NSString )name password:(NSString )password
Parameters#
name
Username
password
The password
Return Value#
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXClient",function="fastSignInByNameWithName:password:" %}{% endlanying_code_snippet %}
fastSignInByNameWithName:password:completion:#
Fast login by username (A successful login required)
- (void)fastSignInByNameWithName:(NSString )name password:(NSString )password completion:(void ( ^ ) ( BMXError aError ))resBlock*
Parameters#
name
Username
password
The password
Return Value#
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXClient",function="fastSignInByNameWithName:password:completion:" %}{% endlanying_code_snippet %}
getSDKConfig#
Get SDK config
- (BMXSDKConfig *)getSDKConfig
Return Value#
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXClient",function="getSDKConfig" %}{% endlanying_code_snippet %}
initializeServerConfigWithIsLocal:#
Initialize server config to accelerate login speed
- (BMXErrorCode)initializeServerConfigWithIsLocal:(BOOL)isLocal
Parameters#
isLocal
true for loading from local file, or downloading from server
Return Value#
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXClient",function="initializeServerConfigWithIsLocal:" %}{% endlanying_code_snippet %}
initializeServerConfigWithIsLocal:completion:#
Initialize server config to accelerate login speed
- (void)initializeServerConfigWithIsLocal:(BOOL)isLocal completion:(void ( ^ ) ( BMXError aError ))resBlock*
Parameters#
isLocal
true for loading from local file, or downloading from server
Return Value#
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXClient",function="initializeServerConfigWithIsLocal:completion:" %}{% endlanying_code_snippet %}
onNetworkChangedWithType:reconnect:#
Send network status change events to SDK
- (void)onNetworkChangedWithType:(BMXNetworkType)type reconnect:(BOOL)reconnect
Parameters#
type
New network type
reconnect
Need to reconnect or not
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXClient",function="onNetworkChangedWithType:reconnect:" %}{% endlanying_code_snippet %}
reconnect#
Enforce reconnection
- (void)reconnect
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXClient",function="reconnect" %}{% endlanying_code_snippet %}
reconnectWithCompletion:#
Enforce reconnection
- (void)reconnectWithCompletion:(void ( ^ ) ( BMXError aError ))resBlock*
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXClient",function="reconnectWithCompletion:" %}{% endlanying_code_snippet %}
sendMessageWithMsg:#
Send a message
This API retrieves the group member IDs and adds them to the message config automatically; the client does not need to populate the member list.
- (void)sendMessageWithMsg:(BMXMessage )msg*
Parameters#
msg
Message to send
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXClient",function="sendMessageWithMsg:" %}{% endlanying_code_snippet %}
sendMessageWithMsg:completion:#
Send a message
This API retrieves the group member IDs and adds them to the message config automatically; the client does not need to populate the member list.
- (void)sendMessageWithMsg:(BMXMessage )msg completion:(void ( ^ ) ( BMXError aError ))resBlock
Parameters#
msg
Message to send
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXClient",function="sendMessageWithMsg:completion:" %}{% endlanying_code_snippet %}
signInByIdWithArg1:password:#
Sign in by username
- (BMXErrorCode)signInByIdWithArg1:(long long)arg1 password:(NSString )password*
Parameters#
password
The password
name
Username
Return Value#
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXClient",function="signInByIdWithArg1:password:" %}{% endlanying_code_snippet %}
signInByIdWithArg1:password:completion:#
Sign in by user ID
- (void)signInByIdWithArg1:(long long)arg1 password:(NSString )password completion:(void ( ^ ) ( BMXError aError ))resBlock
Parameters#
password
The password
int64_t
User ID
Return Value#
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXClient",function="signInByIdWithArg1:password:completion:" %}{% endlanying_code_snippet %}
signInByNameWithName:password:#
Sign in by username
- (BMXErrorCode)signInByNameWithName:(NSString )name password:(NSString )password
Parameters#
name
Username
password
The password
Return Value#
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXClient",function="signInByNameWithName:password:" %}{% endlanying_code_snippet %}
signInByNameWithName:password:completion:#
Sign in by username
- (void)signInByNameWithName:(NSString )name password:(NSString )password completion:(void ( ^ ) ( BMXError aError ))resBlock*
Parameters#
name
Username
password
The password
Return Value#
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXClient",function="signInByNameWithName:password:completion:" %}{% endlanying_code_snippet %}
signInStatus#
Get login status
- (BMXSignInStatus)signInStatus
Return Value#
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXClient",function="signInStatus" %}{% endlanying_code_snippet %}
signOut#
- (BMXErrorCode)signOut
{% lanying_code_snippet repo="lanying-im-ios",class="BMXClient",function="signOut" %}{% endlanying_code_snippet %}
signOutWithCompletion:#
- (void)signOutWithCompletion:(void ( ^ ) ( BMXError aError ))resBlock*
{% lanying_code_snippet repo="lanying-im-ios",class="BMXClient",function="signOutWithCompletion:" %}{% endlanying_code_snippet %}
signOutWithUid:#
- (BMXErrorCode)signOutWithUid:(long long)uid
{% lanying_code_snippet repo="lanying-im-ios",class="BMXClient",function="signOutWithUid:" %}{% endlanying_code_snippet %}
signOutWithUid:completion:#
- (void)signOutWithUid:(long long)uid completion:(void ( ^ ) ( BMXError aError ))resBlock*
{% lanying_code_snippet repo="lanying-im-ios",class="BMXClient",function="signOutWithUid:completion:" %}{% endlanying_code_snippet %}
signOutWithUid:ignoreUnbindDevice:#
Sign out
- (BMXErrorCode)signOutWithUid:(long long)uid ignoreUnbindDevice:(BOOL)ignoreUnbindDevice
Parameters#
uid
My user ID
ignoreUnbindDevice
Ignore unbinding device on sign out
Return Value#
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXClient",function="signOutWithUid:ignoreUnbindDevice:" %}{% endlanying_code_snippet %}
signOutWithUid:ignoreUnbindDevice:completion:#
Sign out
- (void)signOutWithUid:(long long)uid ignoreUnbindDevice:(BOOL)ignoreUnbindDevice completion:(void ( ^ ) ( BMXError aError ))resBlock*
Parameters#
uid
My user ID
ignoreUnbindDevice
Ignore unbinding device on sign out
Return Value#
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXClient",function="signOutWithUid:ignoreUnbindDevice:completion:" %}{% endlanying_code_snippet %}
signUpNewUserWithUsername:password:bmxUserProfilePtr:#
Sign up a new account
- (BMXErrorCode)signUpNewUserWithUsername:(NSString )username password:(NSString )password bmxUserProfilePtr:(BMXUserProfile )bmxUserProfilePtr*
Parameters#
username
Username
password
The password
bmxUserProfilePtr
Profile of the new user
Return Value#
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXClient",function="signUpNewUserWithUsername:password:bmxUserProfilePtr:" %}{% endlanying_code_snippet %}
signUpNewUserWithUsername:password:completion:#
Sign up a new account
- (void)signUpNewUserWithUsername:(NSString )username password:(NSString )password completion:(void ( ^ ) ( BMXUserProfile profile , BMXError aError ))resBlock
Parameters#
username
Username
password
The password
bmxUserProfilePtr
Profile of the new user
Return Value#
Declared In#
floo_proxy.h
Example:
{% lanying_code_snippet repo="lanying-im-ios",class="BMXClient",function="signUpNewUserWithUsername:password:completion:" %}{% endlanying_code_snippet %}