#import <EMClient.h>
◆ addDelegate:
- (void) addDelegate: |
|
(3_1_0) |
|
|
|
(3_2_2) |
|
|
|
("Use -") |
EM_DEPRECATED_IOS[IEMCallManager addDelegate:delegateQueue:] |
|
|
| |
◆ addDelegate:delegateQueue:
Add delegate
- Parameters
-
aDelegate | Delegate |
aQueue | (optional) The queue of calling delegate methods. Pass in nil to run on main thread. |
◆ addMultiDevicesDelegate:delegateQueue:
- (void) addMultiDevicesDelegate: |
|
(id< EMMultiDevicesDelegate >) |
aDelegate |
delegateQueue: |
|
(dispatch_queue_t) |
aQueue |
|
|
| |
Add multi-device delegate
- Parameters
-
aDelegate | Delegate |
aQueue | The queue of calling delegate methods |
◆ application:didReceiveRemoteNotification:
- (void) application: |
|
(id) |
application |
didReceiveRemoteNotification: |
|
(NSDictionary *) |
userInfo |
|
|
| |
Invoked when receiving APNs in foreground
- Parameters
-
application | UIApplication |
userInfo | Push content |
◆ applicationDidEnterBackground:
- (void) applicationDidEnterBackground: |
|
(id) |
aApplication |
|
Disconnect from server when app enters background
- Parameters
-
aApplication | UIApplication |
◆ applicationWillEnterForeground:
- (void) applicationWillEnterForeground: |
|
(id) |
aApplication |
|
Reconnect to server when app enters foreground
- Parameters
-
aApplication | UIApplication |
◆ asyncBindDeviceToken:success:failure:
Bind device token
- Parameters
-
aDeviceToken | Device token to bind |
aSuccessBlock | The callback block of success |
aFailureBlock | The callback block of failure |
◆ asyncGetPushOptionsFromServer:failure:
- (void) asyncGetPushOptionsFromServer: |
|
(void(^)(EMPushOptions *aOptions)) |
aSuccessBlock |
failure: |
|
(3_1_0) |
|
|
|
(3_2_2) |
|
|
|
("Use -getPushOptionsFromServerWithCompletion:") |
EM_DEPRECATED_IOS |
|
|
| |
Get apns options from the server
- Parameters
-
aSuccessBlock | The callback block of success |
aFailureBlock | The callback block of failure |
◆ asyncLoginWithUsername:password:success:failure:
- (void) asyncLoginWithUsername: |
|
(NSString *) |
aUsername |
password: |
|
(NSString *) |
aPassword |
success: |
|
(void(^)()) |
aSuccessBlock |
failure: |
|
(3_1_0) |
|
|
|
(3_2_2) |
|
|
|
("Use -loginWithUsername:password:completion") |
EM_DEPRECATED_IOS |
|
|
| |
Login
- Parameters
-
aUsername | Username |
aPassword | Password |
aSuccessBlock | The callback block of success |
aFailureBlock | The callback block of failure |
◆ asyncLogout:success:failure:
- (void) asyncLogout: |
|
(BOOL) |
aIsUnbindDeviceToken |
success: |
|
(void(^)()) |
aSuccessBlock |
failure: |
|
(3_1_0) |
|
|
|
(3_2_2) |
|
|
|
("Use -logout:completion:") |
EM_DEPRECATED_IOS |
|
|
| |
Logout
- Parameters
-
aIsUnbindDeviceToken | Unbind device token to disable the Apple Push Notification Service |
- Returns
- Error
◆ asyncRegisterWithUsername:password:success:failure:
- (void) asyncRegisterWithUsername: |
|
(NSString *) |
aUsername |
password: |
|
(NSString *) |
aPassword |
success: |
|
(void(^)()) |
aSuccessBlock |
failure: |
|
(3_1_0) |
|
|
|
(3_2_2) |
|
|
|
("Use -registerWithUsername:password:completion:") |
EM_DEPRECATED_IOS |
|
|
| |
Register a new user
To enhance the reliability, registering new IM user through REST API from backend is highly recommended
- Parameters
-
aUsername | Username |
aPassword | Password |
aSuccessBlock | The callback block of success |
aFailureBlock | The callback block of failure |
◆ asyncSetApnsNickname:success:failure:
- (void) asyncSetApnsNickname: |
|
(NSString *) |
aNickname |
success: |
|
(void(^)()) |
aSuccessBlock |
failure: |
|
(3_1_0) |
|
|
|
(3_2_2) |
|
|
|
("Use -updatePushNotifiationDisplayName:copletion") |
EM_DEPRECATED_IOS |
|
|
| |
Set display name for push notification
- Parameters
-
aNickname | Push Notification display name |
aSuccessBlock | The callback block of success |
aFailureBlock | The callback block of failure |
◆ asyncUpdatePushOptionsToServer:failure:
Update APNS options to the server
- Parameters
-
aSuccessBlock | The callback block of success |
aFailureBlock | The callback block of failure |
◆ asyncUploadLogToServer:failure:
Upload log to server
- Parameters
-
aSuccessBlock | The callback block of success |
aFailureBlock | The callback block of failure |
◆ bindDeviceToken:
- (EMError *) bindDeviceToken: |
|
(NSData *) |
aDeviceToken |
|
Device token binding is required to enable Apple Push Notification Service
Synchronization method will block the current thread
- Parameters
-
aDeviceToken | Device token to bind |
- Returns
- Error
◆ bindPushKitToken:
- (EMError *) bindPushKitToken: |
|
(NSData *) |
aPushToken |
|
Pushkit token binding is required to enable Apple PushKit Service
Synchronization method will block the current thread
- Parameters
-
aPushToken | pushkit token to bind |
- Returns
- Error
◆ changeAppkey:
- (EMError *) changeAppkey: |
|
(NSString *) |
aAppkey |
|
Change appkey. Can only change appkey when the user is logged out
- Parameters
-
- Returns
- Error
◆ EM_DEPRECATED_IOS [1/3]
iOS-specific, data migration to SDK3.0
Synchronization method will block the current thread
It's needed to call this method when update to SDK3.0, developers need to wait this method complete before DB related operations
- Returns
- Whether migration successful
◆ EM_DEPRECATED_IOS [2/3]
- (3_1_0, 3_7_2, "") EM_DEPRECATED_IOS |
|
|
|
Update Apple Push Notification Service options to the server
Synchronization method will block the current thread
- Returns
- Error
◆ EM_DEPRECATED_IOS [3/3]
- (EMPushOptions* pushOptions) EM_DEPRECATED_IOS |
|
(3_1_0) |
|
|
|
(3_7_2) |
|
|
|
("Use -") |
[IEMPushManager.pushOptions] |
|
|
| |
Apple Push Notification Service setting
◆ fetchTokenWithUsername:password:completion:
- (void) fetchTokenWithUsername: |
|
(NSString *) |
aUsername |
password: |
|
(NSString *) |
aPassword |
completion: |
|
(void(^)(NSString *aToken, EMError *aError)) |
aCompletionBlock |
|
|
| |
Get the token from the server
- Parameters
-
aUsername | Username |
aPassword | Password |
aCompletionBlock | The callback of completion block |
◆ getLogFilesPath:
- (NSString *) getLogFilesPath: |
|
(EMError **) |
pError |
|
Compress the log file into a .gz file and return the gz file path. Recommend delete the gz file if file is no longer used
Synchronization method will block the current thread
- Parameters
-
- Returns
- File path
◆ getLogFilesPathWithCompletion:
- (void) getLogFilesPathWithCompletion: |
|
(void(^)(NSString *aPath, EMError *aError)) |
aCompletionBlock |
|
Compress the log file into a .gz file and return the gz file path. Recommend delete the gz file if file is no longer used
- Parameters
-
aCompletionBlock | The callback of completion block |
◆ getLoggedInDevicesFromServerWithUsername:password:completion:
- (void) getLoggedInDevicesFromServerWithUsername: |
|
(NSString *) |
aUsername |
password: |
|
(NSString *) |
aPassword |
completion: |
|
(void(^)(NSArray *aList, EMError *aError)) |
aCompletionBlock |
|
|
| |
Get all the device information <EMDeviceConfig> that logged in to the server
- Parameters
-
aUsername | Username |
aPassword | Password |
aCompletionBlock | The callback block of completion |
- Returns
- aList Information of logged in device <EMDeviceConfig>
◆ getLoggedInDevicesFromServerWithUsername:password:error:
- (NSArray *) getLoggedInDevicesFromServerWithUsername: |
|
(NSString *) |
aUsername |
password: |
|
(NSString *) |
aPassword |
error: |
|
(EMError **) |
pError |
|
|
| |
Get all the device information <EMDeviceConfig> that logged in to the server
Synchronization method will block the current thread
- Parameters
-
aUsername | Username |
aPassword | Password |
pError | Error |
- Returns
- Information of logged in device <EMDeviceConfig>
◆ getPushNotificationOptionsFromServerWithCompletion:
- (void) getPushNotificationOptionsFromServerWithCompletion: |
|
(3_1_0) |
|
|
|
(3_7_2) |
|
|
|
("Use -") |
EM_DEPRECATED_IOS[IEMPushManager:getPushNotificationOptionsFromServerWithCompletion:] |
|
|
| |
Get Apple Push Notification Service options from the server
- Parameters
-
aCompletionBlock | The callback of completion block |
◆ getPushOptionsFromServerWithError:
- (EMPushOptions *) getPushOptionsFromServerWithError: |
|
(3_1_0) |
|
|
|
(3_7_2) |
|
|
|
("Use -") |
EM_DEPRECATED_IOS[IEMPushManager:getPushOptionsFromServerWithError:] |
|
|
| |
Get Apple Push Notification Service options from the server
Synchronization method will block the current thread
- Parameters
-
- Returns
- Apple Push Notification Service options
◆ initializeSDKWithOptions:
Initialize the SDK
- Parameters
-
aOptions | SDK setting options |
- Returns
- Error
◆ kickAllDevicesWithUsername:password:
- (EMError *) kickAllDevicesWithUsername: |
|
(NSString *) |
aUsername |
password: |
|
(NSString *) |
aPassword |
|
|
| |
Force logout all logged in device for the specified user
Synchronization method will block the current thread
- Parameters
-
aUsername | Username |
aPassword | Password |
- Returns
- Error
◆ kickAllDevicesWithUsername:password:completion:
- (void) kickAllDevicesWithUsername: |
|
(NSString *) |
aUsername |
password: |
|
(NSString *) |
aPassword |
completion: |
|
(void(^)(EMError *aError)) |
aCompletionBlock |
|
|
| |
Force all logged in device to logout.
- Parameters
-
aUsername | Username |
aPassword | Password |
aCompletionBlock | The callback block of completion |
◆ kickDevice:username:password:
Force logout the specified device
device information can be obtained from getLoggedInDevicesFromServerWithUsername:password:error:
Synchronization method will block the current thread
- Parameters
-
aDevice | device information <EMDeviceConfig> |
aUsername | Username |
aPassword | Password |
- Returns
- Error
◆ kickDevice:username:password:completion:
Force logout the specified device
device information can be obtained from getLoggedInDevicesFromServerWithUsername:password:error:
- Parameters
-
aDevice | device information <EMDeviceConfig> |
aUsername | Username |
aPassword | Password |
aCompletionBlock | The callback block of completion |
◆ kickDeviceWithUsername:password:resource:
- (EMError *) kickDeviceWithUsername: |
|
(NSString *) |
aUsername |
password: |
|
(NSString *) |
aPassword |
resource: |
|
(NSString *) |
aResource |
|
|
| |
Force logout the specified device
device information can be obtained from getLoggedInDevicesFromServerWithUsername:password:error:
Synchronization method will block the current thread
- Parameters
-
aUsername | Username |
aPassword | Password |
aResource | device resource |
- Returns
- Error
◆ kickDeviceWithUsername:password:resource:completion:
- (void) kickDeviceWithUsername: |
|
(NSString *) |
aUsername |
password: |
|
(NSString *) |
aPassword |
resource: |
|
(NSString *) |
aResource |
completion: |
|
(void(^)(EMError *aError)) |
aCompletionBlock |
|
|
| |
Force logout the specified device
device information can be obtained from getLoggedInDevicesFromServerWithUsername:password:error:
- Parameters
-
aUsername | Username |
aPassword | Password |
aResource | device resource |
aCompletionBlock | The callback block of completion |
◆ log:
- (void) log: |
|
(NSString *) |
aLog |
|
Output log info to log file.You can call this method after the SDK has been initialized.
- Parameters
-
◆ loginWithUsername:password:
- (EMError *) loginWithUsername: |
|
(NSString *) |
aUsername |
password: |
|
(NSString *) |
aPassword |
|
|
| |
Login with password
Synchronization method will block the current thread
- Parameters
-
aUsername | Username |
aPassword | Password |
- Returns
- Error
◆ loginWithUsername:password:completion:
- (void) loginWithUsername: |
|
(NSString *) |
aUsername |
password: |
|
(NSString *) |
aPassword |
completion: |
|
(void(^)(NSString *aUsername, EMError *aError)) |
aCompletionBlock |
|
|
| |
Login with password
- Parameters
-
aUsername | Username |
aPassword | Password |
aCompletionBlock | The callback of completion block |
◆ loginWithUsername:token:
- (EMError *) loginWithUsername: |
|
(NSString *) |
aUsername |
token: |
|
(NSString *) |
aToken |
|
|
| |
Login with token. Does not support automatic login
Synchronization method will block the current thread
- Parameters
-
aUsername | Username |
aToken | Token |
- Returns
- Error
◆ loginWithUsername:token:completion:
- (void) loginWithUsername: |
|
(NSString *) |
aUsername |
token: |
|
(NSString *) |
aToken |
completion: |
|
(void(^)(NSString *aUsername, EMError *aError)) |
aCompletionBlock |
|
|
| |
Login with token. Does not support automatic login
- Parameters
-
aUsername | Username |
aToken | Token |
aCompletionBlock | The callback of completion block |
◆ logout:
- (EMError *) logout: |
|
(BOOL) |
aIsUnbindDeviceToken |
|
Logout
Synchronization method will block the current thread
- Parameters
-
aIsUnbindDeviceToken | Unbind device token to disable Apple Push Notification Service |
- Returns
- Error
◆ logout:completion:
- (void) logout: |
|
(BOOL) |
aIsUnbindDeviceToken |
completion: |
|
(void(^)(EMError *aError)) |
aCompletionBlock |
|
|
| |
Logout
- Parameters
-
aIsUnbindDeviceToken | Unbind device token to disable the Apple Push Notification Service |
aCompletionBlock | The callback of completion block |
◆ migrateDatabaseToLatestSDK
- (BOOL) migrateDatabaseToLatestSDK |
|
|
|
Migrate the IM database to the latest SDK version
Synchronization method will block the current thread
- Returns
- Return YES for success
◆ registerForRemoteNotificationsWithDeviceToken:completion:
- (void) registerForRemoteNotificationsWithDeviceToken: |
|
(NSData *) |
aDeviceToken |
completion: |
|
(void(^)(EMError *aError)) |
aCompletionBlock |
|
|
| |
Device token binding is required to enable Apple push notification service
- Parameters
-
aDeviceToken | Device token to bind |
aCompletionBlock | The callback block of completion |
◆ registerPushKitToken:completion:
- (void) registerPushKitToken: |
|
(NSData *) |
aPushToken |
completion: |
|
(void(^)(EMError *aError)) |
aCompletionBlock |
|
|
| |
Pushkit token binding is required to enable Apple PushKit Service
- Parameters
-
aPushToken | pushkit token to bind |
aCompletionBlock | The callback block of completion |
◆ registerWithUsername:password:
- (EMError *) registerWithUsername: |
|
(NSString *) |
aUsername |
password: |
|
(NSString *) |
aPassword |
|
|
| |
Register a new IM user
To ensure good reliability, registering new IM user via REST API from developer backend is highly recommended
- Parameters
-
aUsername | Username |
aPassword | Password |
- Returns
- Error
◆ registerWithUsername:password:completion:
- (void) registerWithUsername: |
|
(NSString *) |
aUsername |
password: |
|
(NSString *) |
aPassword |
completion: |
|
(void(^)(NSString *aUsername, EMError *aError)) |
aCompletionBlock |
|
|
| |
Register a new IM user
To ensure good reliability, registering new IM user via REST API from developer backend is highly recommended
- Parameters
-
aUsername | Username |
aPassword | Password |
aCompletionBlock | The callback of completion block |
◆ removeDelegate:
- (void) removeDelegate: |
|
(id) |
aDelegate |
|
Remove delegate
- Parameters
-
◆ removeMultiDevicesDelegate:
Remove multi devices delegate
- Parameters
-
◆ serviceCheckWithUsername:password:completion:
- (void) serviceCheckWithUsername: |
|
(NSString *) |
aUsername |
password: |
|
(NSString *) |
aPassword |
completion: |
|
(void(^)(EMServerCheckType aType, EMError *aError)) |
aCompletionBlock |
|
|
| |
Make a diagnose for service, Diagnosis of current services according to the order of EMServerCheckType enumeration, and callback for the developer If you have logged in, use the default login account
- Parameters
-
aUsername | username |
aPassword | password |
aCompletionBlock | The callback block of completion |
◆ setApnsNickname:
- (EMError *) setApnsNickname: |
|
(3_1_0) |
|
|
|
(3_7_2) |
|
|
|
("Use -") |
EM_DEPRECATED_IOS[IEMPushManager:setApnsNickname:] |
|
|
| |
Set display name for Apple Push Notification message
Synchronization method will block the current thread
- Parameters
-
- Returns
- Error
◆ sharedClient
+ (instancetype) sharedClient |
|
|
|
Get SDK singleton instance
◆ unBindPushKitToken
Disable Apple PushKit Service
Synchronization method will block the current thread
- Returns
- Error
◆ unRegisterPushKitTokenWithCompletion:
- (void) unRegisterPushKitTokenWithCompletion: |
|
(void(^)(EMError *aError)) |
aCompletionBlock |
|
Disable Apple PushKit Service
- Parameters
-
aCompletionBlock | The callback block of completion |
◆ updatePushNotifiationDisplayName:completion:
- (void) updatePushNotifiationDisplayName: |
|
(NSString *) |
aDisplayName |
completion: |
|
(3_1_0) |
|
|
|
(3_7_2) |
|
|
|
("Use -") |
EM_DEPRECATED_IOS[IEMPushManager:updatePushNotifiationDisplayName:completion:] |
|
|
| |
Set display name for the push notification
- Parameters
-
aDisplayName | Display name of push |
aCompletionBlock | The callback block of completion |
◆ updatePushNotificationOptionsToServerWithCompletion:
- (void) updatePushNotificationOptionsToServerWithCompletion: |
|
(3_1_0) |
|
|
|
(3_7_2) |
|
|
|
("") |
EM_DEPRECATED_IOS |
|
|
| |
Update Apple Push Notification Service options to the server
- Parameters
-
aCompletionBlock | The callback block of completion |
◆ uploadDebugLogToServerWithCompletion:
- (void) uploadDebugLogToServerWithCompletion: |
|
(void(^)(EMError *aError)) |
aCompletionBlock |
|
Upload debugging log to server
- Parameters
-
aCompletionBlock | The callback of completion block |
◆ uploadLogToServer
Upload debugging log to server
Synchronization method will block the current thread
- Returns
- Error
◆ accessUserToken
- (NSString*) accessUserToken |
|
readnonatomicassign |
Current user hyphenate token
◆ chatManager
◆ contactManager
◆ currentUsername
- (NSString*) currentUsername |
|
readnonatomicstrong |
Current logged in user's username
◆ groupManager
◆ isAutoLogin
If SDK will automatically log into with previously logged in session. If the current login failed, then isAutoLogin attribute will be reset to NO, you need to set it back to YES in order to allow automatic login
- password changed
- deactivate, forced logout, etc
◆ isConnected
Connection status to Hyphenate IM server
◆ isLoggedIn
◆ options
◆ pushManager
◆ roomManager
◆ version
The documentation for this class was generated from the following file: