From 13807f648f6b3db1422a9b544b5919efc8ab8343 Mon Sep 17 00:00:00 2001 From: Vishal Kumar Singh Date: Tue, 21 Apr 2026 16:36:13 +0530 Subject: [PATCH] docs(ios): correct iOS autocapture defaults (closes #16182) The previous iOS autocapture section stated screen navigation was not enabled by default and showed an example in which captureApplicationLifecycleEvents was commented as 'Disabled by default.' Both claims contradict the posthog-ios SDK: captureScreenViews and captureApplicationLifecycleEvents default to true, while captureElementInteractions (iOS / Mac Catalyst only) defaults to false. - Flip the sentence to say screen navigation autocapture is enabled by default. - Add a Default column to the options table and include the previously undocumented captureElementInteractions option. - Rework the Swift example to show how to disable the defaults while enabling element interactions, with correct inline comments. --- .../docs/product-analytics/autocapture.mdx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/contents/docs/product-analytics/autocapture.mdx b/contents/docs/product-analytics/autocapture.mdx index 002810d35095..bce277a82ed6 100644 --- a/contents/docs/product-analytics/autocapture.mdx +++ b/contents/docs/product-analytics/autocapture.mdx @@ -409,20 +409,22 @@ PostHog captures the following events: #### Configuring screen navigation autocapture -Screen navigation autocapture is not enabled by default. You can enable it by setting `captureScreenViews` to `true` in the config. +Screen navigation autocapture is **enabled by default**. You can disable it by setting `captureScreenViews` to `false` in the config. -| Option | Description | -| ----------------------------------- | ----------------------------------------------------------------------------------------------- | -| `captureScreenViews` | **Type:** `boolean`. When set to `true`, autocapture will capture screen views. | -| `captureApplicationLifecycleEvents` | **Type:** `boolean`. When set to `true`, autocapture will capture application lifecycle events. | +| Option | Description | +| ----------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | +| `captureScreenViews` | **Type:** `boolean`. **Default:** `true`. When `true`, autocapture will capture screen views (`$screen` events). | +| `captureApplicationLifecycleEvents` | **Type:** `boolean`. **Default:** `true`. When `true`, autocapture will capture application lifecycle events (`Application Installed` etc.). | +| `captureElementInteractions` | **Type:** `boolean`. **Default:** `false`. When `true`, autocapture will capture element interactions (iOS / Mac Catalyst only). | -For example, your initialization code might look like this: +For example, if you want to turn off the defaults and only enable element interactions, your initialization code might look like this: ```swift let config = PostHogConfig(apiKey: , host: ) -config.captureElementInteractions = true // Disabled by default -config.captureApplicationLifecycleEvents = true // Disabled by default +config.captureScreenViews = false // Enabled by default +config.captureApplicationLifecycleEvents = false // Enabled by default +config.captureElementInteractions = true // Disabled by default PostHogSDK.shared.setup(config) ```