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

# deletePhoneCalendar

按标题和原始时间删除全部匹配的系统日历事件。

## 扫码预览

![扫码预览 deletePhoneCalendar](https://api.qrserver.com/v1/create-qr-code/?size=200x200\&data=doubao%3A%2F%2Fdoubao_apps%3Fapp_id%3Ddb_1McM5Ni%26path%3D%252Fpages%252Fapi%252Fdevice%252Fdelete-phone-calendar%252Findex)

## 支持版本

前端库版本不低于 `0.6.0`。

## 支持平台

<table>
<thead>
<tr><th>平台</th><th>支持情况</th></tr>
</thead>
<tbody>
<tr><td>Android</td><td>支持</td></tr>
<tr><td>iOS</td><td>支持</td></tr>
<tr><td>PC</td><td>不支持</td></tr>
<tr><td>HarmonyOS</td><td>不支持</td></tr>
</tbody>
</table>

## 支持场景

<table>
<thead>
<tr><th>场景</th><th>支持情况</th></tr>
</thead>
<tbody>
<tr><td>页面</td><td>支持</td></tr>
<tr><td>卡片</td><td>支持</td></tr>
</tbody>
</table>

## 接入准备

### 权限要求

<table>
<thead>
<tr><th>类型</th><th>标识</th><th>是否必须</th><th>平台</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td>应用权限</td><td><code>scope.addPhoneCalendar</code></td><td>必须</td><td>Android、iOS</td><td>复用系统日历写入授权。</td></tr>
</tbody>
</table>

### 授权行为

- **Android**：申请应用授权和日历写入权限，拒绝或撤销后调用失败。
- **iOS**：申请应用授权和日历完整访问权限，拒绝或撤销后调用失败。

### 前置条件

- 传入创建时的原始参数；重复事件使用系列首个事件的参数

## 使用说明

- 重复事件删除整个系列；事件不存在也成功；暂不支持全天事件。

## 调用方式

### 异步 API

```typescript
deletePhoneCalendar(params: DeletePhoneCalendarParams): Promise<object>
```

## 入参

<table>
<thead>
<tr><th>名称</th><th>类型</th><th>必填</th><th>默认值</th><th>约束</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td><code>endTime</code></td><td><code>number</code></td><td>否</td><td><code>startTime</code></td><td>-</td><td>创建时的结束时间，Unix 秒级时间戳。</td></tr>
<tr><td><code>startTime</code></td><td><code>number</code></td><td>是</td><td>-</td><td>-</td><td>创建时的开始时间，Unix 秒级时间戳。</td></tr>
<tr><td><code>title</code></td><td><code>string</code></td><td>是</td><td>-</td><td>-</td><td>创建时的标题。</td></tr>
</tbody>
</table>

## 调用示例

```typescript
import { deletePhoneCalendar } from '@doubao-dev/framework/api';
await deletePhoneCalendar({ title: '项目评审', startTime: 1770000000, endTime: 1770001800 });
```

## 成功返回

无返回字段。

## 错误处理

错误对象和通用错误码见 [通用错误处理](/apps-plugin/docs/js-api/common-errors.md#错误返回)。

### 失败示例

```json
{
  "errNo": 102,
  "errMsg": "internal error"
}
```

### 错误码

<table>
<thead>
<tr><th>errNo</th><th>errMsg</th><th>平台</th><th>触发条件</th><th>处理建议</th></tr>
</thead>
<tbody>
<tr><td><code>102</code></td><td><code>internal error</code></td><td>Android、iOS</td><td>系统日历存储删除失败</td><td>稍后重试</td></tr>
<tr><td><code>104</code></td><td><code>invalid parameter</code></td><td>Android、iOS</td><td>标题或时间参数不合法</td><td>检查参数</td></tr>
<tr><td><code>106</code></td><td><code>system permission denied</code></td><td>Android、iOS</td><td>无系统日历权限</td><td>在系统设置中授权</td></tr>
<tr><td><code>107</code></td><td><code>user permission denied</code></td><td>Android、iOS</td><td>应用插件授权被拒绝或取消</td><td>重新授权</td></tr>
</tbody>
</table>
