Skip to content

docs(ios): correct iOS autocapture defaults#16482

Open
singhvishalkr wants to merge 1 commit intoPostHog:masterfrom
singhvishalkr:docs/ios-autocapture-defaults
Open

docs(ios): correct iOS autocapture defaults#16482
singhvishalkr wants to merge 1 commit intoPostHog:masterfrom
singhvishalkr:docs/ios-autocapture-defaults

Conversation

@singhvishalkr
Copy link
Copy Markdown

Problem

Closes #16182.

The iOS autocapture section of /docs/product-analytics/autocapture is wrong in two ways:

  1. It says "Screen navigation autocapture is not enabled by default."
  2. The Swift example comments config.captureApplicationLifecycleEvents = true as "Disabled by default."

Both contradict the posthog-ios SDK defaults:

@objc public var captureApplicationLifecycleEvents: Bool = true
@objc public var captureScreenViews: Bool = true

#if os(iOS) || targetEnvironment(macCatalyst)
    /// Default: false
    @objc public var captureElementInteractions: Bool = false
#endif

Changes

  • Flip the sentence to say screen navigation autocapture is enabled by default.
  • Add a Default column to the options table.
  • Document the previously-missing captureElementInteractions option (iOS / Mac Catalyst only, default false).
  • Rework the Swift example to show how to turn the defaults off while enabling element interactions, with accurate inline comments.

Preview

Before:

Screen navigation autocapture is not enabled by default. You can enable it by setting captureScreenViews to true in the config.

config.captureElementInteractions = true // Disabled by default
config.captureApplicationLifecycleEvents = true // Disabled by default

After:

Screen navigation autocapture is enabled by default. You can disable it by setting captureScreenViews to false in the config.

config.captureScreenViews = false                // Enabled by default
config.captureApplicationLifecycleEvents = false // Enabled by default
config.captureElementInteractions = true         // Disabled by default

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.
@singhvishalkr singhvishalkr force-pushed the docs/ios-autocapture-defaults branch from d4021c3 to 13807f6 Compare April 21, 2026 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docs] iOS captureScreenViews default value is incorrect

1 participant