---
metadata:
  - name: generator
    content: Diplodoc Platform v5.64.0
alternate:
  - https://appmetrica.yandex.by/docs/en/sdk/ios/analytics/swift/MutableReporterConfiguration.md
  - https://appmetrica.yandex.by/docs/ru/sdk/ios/analytics/swift/MutableReporterConfiguration.md
  - https://appmetrica.yandex.by/docs/zh/sdk/ios/analytics/swift/MutableReporterConfiguration.md
  - href: https://appmetrica.yandex.by/docs/zh/sdk/ios/analytics/swift/MutableReporterConfiguration.md
    type: text/markdown
    title: Markdown version
  - href: https://appmetrica.yandex.by/docs/zh/llms.txt?revision=r21874424
    rel: describedby
---
> **Documentation Index:** Fetch the complete configuration index at https://appmetrica.yandex.by/docs/zh/llms.txt?revision=r21874424

# MutableReporterConfiguration 类

可修改的 [ReporterConfiguration](https://appmetrica.yandex.by/docs/zh/sdk/ios/analytics/swift/ReporterConfiguration.md) 类，包含报告器的高级配置。

## Properties {#property_summary}

#|
|| [areLogsEnabled](#property_areLogsEnabled) | 启用/禁用记录库的活动。 ||
|| [dataSendingEnabled](#property_dataSendingEnabled) | 启用/禁用向 AppMetrica 服务器发送统计数据。 ||
|| [dispatchPeriod](#property_dispatchPeriod) | 事件发送间隔时间（秒）。 ||
|| [maxReportsCount](#property_maxReportsCount) | 当事件数量达到`maxReportsCount`时，会触发发送事件。 ||
|| [maxReportsInDatabaseCount](#property_maxReportsInDatabaseCount) | 内部数据库中存储的错误报告最大数量。 ||
|| [sessionTimeout](#property_sessionTimeout) | 设置会话超时时间（秒）。 ||
|| [userProfileID](#property_userProfileID) | 设置用户资料ID（`ProfileID`）在激活时。 ||
|#

## Property descriptions {#property_detail}

### areLogsEnabled {#property_areLogsEnabled}

`var areLogsEnabled: Bool`

启用/禁用记录库的活动。

默认情况下，日志记录已禁用。

### dataSendingEnabled {#property_dataSendingEnabled}

`var dataSendingEnabled: Bool`

启用/禁用向 AppMetrica 服务器发送统计数据。

{% note info %}

禁用向报告者发送统计数据不会影响从主API密钥发送数据。 但禁用主 API 密钥的数据发送会停止所有报告器发送统计数据。

{% endnote %}

默认情况下，发送已启用。

### dispatchPeriod {#property_dispatchPeriod}

`var dispatchPeriod: UInt`

事件发送间隔时间（秒）。

### maxReportsCount {#property_maxReportsCount}

`var maxReportsCount: UInt`

当事件数量达到`maxReportsCount`时，会触发发送事件。

### maxReportsInDatabaseCount {#property_maxReportsInDatabaseCount}

`var maxReportsInDatabaseCount: UInt`

内部数据库中存储的错误报告最大数量。

允许的值范围是 [100; 10,000]。 超出此范围的值会自动替换为最接近范围边界的值。

默认值：1000。

{% note info %}

不同的数据库用于各个 `apiKeys`，并可为它们设置独立的事件数量限制。 此参数仅影响对应的`apiKey`的限制。 要修改其他 `apiKeys` 的最大允许事件数，请使用 [AppMetricaConfiguration.maxReportsInDatabaseCount](https://appmetrica.yandex.by/docs/zh/sdk/ios/analytics/swift/AppMetricaConfiguration.md#property_maxReportsInDatabaseCount)。

{% endnote %}

### sessionTimeout {#property_sessionTimeout}

`var sessionTimeout: UInt`

设置会话超时时间（秒）。

默认值是`10`（最小允许值）。

### userProfileID {#property_userProfileID}

`var userProfileID: String?`

设置用户资料ID（`ProfileID`）在激活时。

{% note alert %}

`ProfileID` 字符串的最大长度为 200 个字符。

{% endnote %}
