Skip to content

chore(react-native-plugin): drop screenshotMode for posthog-ios 4.0 - #5236

Open
turnipdabeets wants to merge 3 commits into
chore/rn-plugin-v3from
chore/rn-plugin-drop-screenshot-mode
Open

turnipdabeets wants to merge 3 commits into
chore/rn-plugin-v3from
chore/rn-plugin-drop-screenshot-mode

Conversation

@turnipdabeets

@turnipdabeets turnipdabeets commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Important

Depends on PostHog/posthog-ios#907 (remove wireframe replay) shipping in posthog-ios 4.0. If #907 merges, this goes in too. If PostHog/posthog-ios#907 is dropped from 4.0, close this PR (or revert it if already merged): without #907, removing this line makes iOS replay fall back to wireframe.

Problem

posthog-ios 4.0 removes wireframe session replay (PostHog/posthog-ios#907). Replay always records masked screenshots, and sessionReplayConfig.screenshotMode becomes a deprecated no-op. The plugin still sets it to true, which will only produce a deprecation warning once we're on 4.0.

Changes

  • Remove config.sessionReplayConfig.screenshotMode = true from the iOS plugin.
  • Changeset (patch): removes the deprecation warning from iOS builds. iOS replay already records screenshots, so replay doesn't change.

⚠️ Merge order

Stacked on #5194, and can merge into it before #5237 (the posthog-ios 4.0 pin), which goes in last. Until #5237 lands, the unreleased #5194 branch runs posthog-ios 3.88.2 without this line, which falls back to wireframe replay. That's fine only because #5194 isn't released without #5237.

Release info Sub-libraries affected

Libraries affected

  • All of them
  • posthog-js (web)
  • posthog-js-lite (web lite)
  • posthog-node
  • posthog-react-native
  • @posthog/react-native-plugin
  • @posthog/react
  • @posthog/ai
  • @posthog/convex
  • @posthog/next
  • @posthog/nextjs-config
  • @posthog/nuxt
  • @posthog/openfeature-node-provider
  • @posthog/openfeature-web-provider
  • @posthog/rollup-plugin
  • @posthog/webpack-plugin
  • @posthog/types
  • @posthog/browser-common

Checklist

  • Tests for new code (one-line removal, nothing to test until the 4.0 pin)
  • Accounted for the impact of any changes across different platforms (iOS only. Android keeps sessionReplayConfig.screenshot = true, since posthog-android still has wireframe mode)
  • Accounted for backwards compatibility of any changes (no breaking changes!)
  • Took care not to unnecessarily increase the bundle size

If releasing new changes

  • Ran pnpm changeset to generate a changeset file

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Prepared with Claude Code. Checked #907's diff: screenshotMode becomes a deprecated property with no effect, and screenshotModeBackgroundCapture (which the plugin also sets) keeps working without it. Not built locally on its own: on the 3.88.2 pin the build is unchanged, but replay would switch to wireframe, which is why 3.0 doesn't release without #5237. The 4.0 build check with this change applied passed (see #5237).

🤖 Generated with Claude Code

@turnipdabeets turnipdabeets self-assigned this Oct 7, 2026
@turnipdabeets
turnipdabeets marked this pull request as ready for review October 7, 2026 19:12
@turnipdabeets
turnipdabeets requested a review from a team as a code owner October 7, 2026 19:12
Comment thread packages/react-native-plugin/ios/PosthogReactNativePlugin.swift
@veria-ai

veria-ai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

PR overview

All previously flagged issues have been addressed. No open security concerns remain on this pull request.

Security review

No open security issues remain on this pull request.

Fixed/addressed: 1 · PR risk: 0/10

@turnipdabeets
turnipdabeets force-pushed the chore/rn-plugin-drop-screenshot-mode branch from 0afd890 to 369cace Compare October 7, 2026 19:31
@turnipdabeets
turnipdabeets changed the base branch from chore/rn-plugin-v3 to chore/rn-plugin-posthog-ios-4-pin October 7, 2026 19:31
@turnipdabeets
turnipdabeets force-pushed the chore/rn-plugin-posthog-ios-4-pin branch from 1e813ac to 0422ed4 Compare October 7, 2026 19:35
@turnipdabeets
turnipdabeets force-pushed the chore/rn-plugin-drop-screenshot-mode branch from 369cace to 14d4f6a Compare October 7, 2026 19:35
@turnipdabeets
turnipdabeets force-pushed the chore/rn-plugin-drop-screenshot-mode branch from 14d4f6a to b56f376 Compare October 7, 2026 19:38
@turnipdabeets
turnipdabeets changed the base branch from chore/rn-plugin-posthog-ios-4-pin to chore/rn-plugin-v3 October 7, 2026 19:38

This branch has not been deployed

No deployments
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.

2 participants