unInitSDK
Feature Introduction
Description
De-initialization.
- iOS
- Android
- Flutter
- uni-app
- React-Native
- Unity
Function Prototype
Future<dynamic> unInitSDK()
Input Parameters
None
Return Results
None
Code Example
await OpenIM.iMManager.unInitSDK();
//todo
Function Prototype
- (void)unInitSDK;
Input Parameters
None
Return Results
None
Code Example
[OIMManager.manager unInitSDK];
Function Prototype
public void unInit()
Input Parameters
None
Return Results
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 for problem location, unique. It's suggested to use the current time and a random number. |
Return Results
The
openim-uniapp-polyfill
package makes the function a Promise. When calling, you need to usethen
andcatch
to determine and handle successful and failed callbacks.
Parameter Name | Parameter Type | Description |
---|---|---|
Promise.then() | Promise<void> | Whether de-initialization was successful |
Promise.catch() | Promise<CatchResponse> | Failed callback |
Code Example
// App.vue
import IMSDK from 'openim-uniapp-polyfill';
IMSDK.asyncApi('unInitSDK', IMSDK.uuid(), config)
.then(() => {
// Successful
})
.catch(({ errCode, errMsg }) => {
// Call failed
});
Function Prototype
OpenIMSDKRN.unInitSDK(operationID: string): Promise<boolean>
Input Parameters
Parameter Name | Parameter Type | Mandatory | Description |
---|---|---|---|
operationID | string | Yes | Operation ID, used for problem location, keep unique, suggest using current time and random number |
Return Result
Parameter Name | Parameter Type | Description |
---|---|---|
Promise.then() | Promise<void> | Whether de-initialization was successful |
Promise.catch() | Promise<CatchResponse> | Callback on failed call |
Code Example
// App.vue
import OpenIMSDKRN from "open-im-sdk-rn";
OpenIMSDKRN.unInitSDK("operationID")
.then(() => {
// Successful
})
.catch(({ errCode, errMsg }) => {
// Call failed
});