8#import <Foundation/Foundation.h>
10#import "EMClientDelegate.h"
14#import "IEMChatManager.h"
15#import "IEMChatroomManager.h"
16#import "EMLogDelegate.h"
31typedef NS_ENUM(NSInteger, EMServerCheckType) {
32 EMServerCheckAccountValidation = 0,
33 EMServerCheckGetDNSListFromServer,
34 EMServerCheckGetTokenFromServer,
36 EMServerCheckDoLogout,
60@property(nonatomic, strong, readonly) NSString * _Nonnull version;
69@property(nonatomic, strong, readonly) NSString * _Nullable currentUsername;
78@property(nonatomic, strong, readonly)
EMOptions * _Nonnull options;
87@property(nonatomic, strong, readonly) id<IEMChatManager> _Nullable chatManager;
96@property(nonatomic, strong, readonly) id<IEMChatroomManager> _Nullable roomManager;
116@property(nonatomic, readonly) BOOL isAutoLogin;
129@property(nonatomic, readonly) BOOL isLoggedIn;
141@property(nonatomic, readonly) BOOL isConnected;
154@property(nonatomic, readonly) NSString * _Nullable accessUserToken;
163+ (instancetype _Nonnull )sharedClient;
173- (NSString *)version;
175#pragma mark - Delegate
190 delegateQueue:(dispatch_queue_t _Nullable )aQueue;
203- (void)removeDelegate:(
id _Nonnull )aDelegate;
205#pragma mark - Initialize SDK
222- (
EMError *_Nullable)initializeSDKWithOptions:(
EMOptions * _Nonnull )aOptions;
224#pragma mark - User Registration
253- (
EMError *_Nullable)registerWithUsername:(NSString * _Nonnull)aUsername
254 password:(NSString * _Nonnull)aPassword;
280- (void)registerWithUsername:(NSString *_Nonnull)aUsername
281 password:(NSString *_Nonnull)aPassword
282 completion:(
void (^_Nullable)(NSString * _Nonnull aUsername,
EMError * _Nullable aError))aCompletionBlock;
311- (
EMError *_Nullable)loginWithUsername:(NSString *_Nonnull)aUsername
312 password:(NSString *_Nonnull)aPassword;
338- (void)loginWithUsername:(NSString *_Nonnull)aUsername
339 password:(NSString *_Nonnull)aPassword
340 completion:(
void (^_Nullable)(NSString * _Nonnull aUsername,
EMError *_Nullable aError))aCompletionBlock;
367- (
EMError *_Nullable)loginWithUsername:(NSString *_Nonnull)aUsername
368 token:(NSString *_Nonnull)aToken;
390- (void)loginWithUsername:(NSString *_Nonnull)aUsername
391 token:(NSString *_Nonnull)aToken
392 completion:(
void (^_Nullable)(NSString * _Nonnull aUsername,
EMError *_Nullable aError))aCompletionBlock;
417- (
EMError *_Nullable)renewToken:(NSString *_Nonnull)newToken;
442- (void)renewToken:(NSString *_Nonnull)newToken completion:(
void (^_Nullable)(
EMError* _Nullable aError))aCompletionBlock;
470- (
EMError *_Nullable)logout:(BOOL)aIsUnbindDeviceToken;
495- (void)logout:(BOOL)aIsUnbindDeviceToken
496 completion:(
void (^_Nullable)(
EMError * _Nullable aError))aCompletionBlock;
524- (
EMError *_Nullable)bindDeviceToken:(NSData *_Nonnull)aDeviceToken;
547- (void)registerForRemoteNotificationsWithDeviceToken:(NSData *_Nonnull)aDeviceToken
548 completion:(
void (^_Nullable)(
EMError *_Nullable aError))aCompletionBlock;
569- (
EMError *_Nullable)uploadLogToServer;
582- (void)uploadDebugLogToServerWithCompletion:(
void (^_Nullable)(
EMError *_Nullable aError))aCompletionBlock;
607- (NSString *_Nullable)getLogFilesPath:(
EMError **_Nullable)pError;
628- (void)getLogFilesPathWithCompletion:(
void (^_Nullable)(NSString *_Nullable aPath,
EMError * _Nullable aError))aCompletionBlock;
649- (void)log:(NSString *_Nonnull)aLog;
665 delegateQueue:(dispatch_queue_t _Nullable )aQueue NS_SWIFT_NAME(addLog(delegate:queue:));
678- (void)removeLogDelegate:(
id<
EMLogDelegate>_Nonnull)aDelegate NS_SWIFT_NAME(removeLog(delegate:));
696- (void)applicationDidEnterBackground:(
id _Nonnull )aApplication;
711- (void)applicationWillEnterForeground:(
id _Nonnull )aApplication;
728- (void)application:(
id _Nonnull)application didReceiveRemoteNotification:(NSDictionary * _Nullable)userInfo;
Definition: EMClient.h:50
Definition: EMOptions.h:41
Definition: EMClientDelegate.h:46
Definition: EMLogDelegate.h:18