> For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt.

# unsubscribeMessage

APISummary
取消订阅指定类型的调试消息。

此方法是 [`subscribeMessage`](/next/zh/api/lynx-devtool-native-api/lynx-base-inspector-owner/subscribe-message.md) 的配对操作。当你不再需要接收某种类型的消息时，应调用此方法来取消订阅。

## 语法

### iOS

```objective-c title="LynxBaseInspectorOwnerNG.h"
- (void)unsubscribeMessage:(nonnull NSString *)type;
```

### Android

```java title="LynxBaseInspectorOwnerNG.java"
void unsubscribeMessage(String type);
```

### Harmony

```ts title="LynxBaseInspectorOwner.ets"
unsubscribeMessage(type: string): void;
```

### 参数说明

- `type`: 要取消订阅的消息类型。

## 使用示例

请参考 [`subscribeMessage`](/next/zh/api/lynx-devtool-native-api/lynx-base-inspector-owner/subscribe-message.md#使用示例)。

## 兼容性

**Compatibility Table**

**Query:** `lynx-devtool-native-api.lynx-base-inspector-owner.unsubscribe-message`

[Source](https://github.com/lynx-family/lynx-website/tree/main/packages/lynx-compat-data/lynx-devtool-native-api/lynx-base-inspector-owner/unsubscribe-message.json)

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| unsubscribe-message | Yes (3.0) | Yes (3.8) | Yes (3.0) | Unknown | Unknown | No |

**`unsubscribe-message`**

unsubscribeMessage

