unInitSDK
Description
info
Un-initialize the SDK. After successful un-initialization, you can re-initialize and set new IM connection information.
- iOS
- Android
- Flutter
- uni-app
- React-Native
- Unity
Function Prototype
Future<dynamic> unInitSDK()
Input Parameters
None
Return Result
None
Code Example
await OpenIM.iMManager.unInitSDK();
//todo
Function Prototype
- (void)unInitSDK;
Input Parameters
None
Return Result
None
Code Example
[OIMManager.manager unInitSDK];
Function Prototype
public void unInit()
Input Parameters
None
Return Result
None
Code Example
OpenIMClient.getInstance().unInit();
Function Prototype
IMSDK.asyncApi("unInitSDK",operationID: string): Promise<boolean>
Input Parameters
| Parameter Name | Parameter Type | Required | Description |
|---|---|---|---|
| operationID | string | Yes | Operation ID, used to pinpoint issues, keep unique, prefer time+random |
Return Result
Use the
openim-uniapp-polyfillpackage to make the function Promise. When calling, you need to usethenandcatchto determine and handle success and failure callbacks.
| Parameter Name | Parameter Type | Description |
|---|---|---|
| Promise.then() | Promise<void> | Whether un-initialization was successful |
| Promise.catch() | Promise<CatchResponse> | Failure callback |
Code Example
// App.vue
import IMSDK from 'openim-uniapp-polyfill';
IMSDK.asyncApi('unInitSDK', IMSDK.uuid(), config)
.then(() => {
// Call successful
})
.catch(({ errCode, errMsg }) => {
// Call failed
});
Function Prototype
OpenIMSDK.unInitSDK(operationID?: string): Promise<boolean>
Input Parameters
| Parameter Name | Parameter Type | Required | Description |
|---|---|---|---|
| operationID | string | No | Operation ID, used to pinpoint issues, keep unique, prefer time+random |
Return Result
| Parameter Name | Parameter Type | Description |
|---|---|---|
| Promise.then() | Promise<void> | Whether un-initialization was successful |
| Promise.catch() | Promise<OpenIMApiError> | Failure callback |
Code Example
import OpenIMSDK from "@openim/rn-client-sdk";
OpenIMSDK.unInitSDK()
.then(() => {
// Call successful
})
.catch((error) => {
// Call failed
});