Skip to content

chore(react-native-plugin)!: require posthog-ios 4.0 - #5237

Open
turnipdabeets wants to merge 3 commits into
chore/rn-plugin-v3from
chore/rn-plugin-posthog-ios-4-pin
Open

turnipdabeets wants to merge 3 commits into
chore/rn-plugin-v3from
chore/rn-plugin-posthog-ios-4-pin

Conversation

@turnipdabeets

@turnipdabeets turnipdabeets commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Prep PR: CI is expected to fail until posthog-ios 4.0 is released. The iOS and macOS example builds can't resolve 4.0.0 from CocoaPods or SwiftPM yet. Merge into #5194 last, once 4.0 is published and CI is green. Plugin 3.0 is released only after this PR.

Problem

#5194 (plugin 3.0) keeps posthog-ios at 3.88.2. This is the follow-up that moves to posthog-ios 4.0, which needs Xcode 26 and raises the floors to iOS 15 and macOS 11 (the plugin already matches those in #5194).

Changes

  • posthog_ios_version in the podspec and the floor in ios/Package.swift move to 4.0.0. check-spm-manifest.mjs keeps checking that they match.
  • Changesets: Breaking posthog-ios 4.0 / Xcode 26, plus a patch entry for 4.0's behavior change: native uploads (replay, crash reports) pause while cellular data is turned off for the app, instead of sending requests that fail (PostHog/posthog-ios#909).
  • ios/Package.swift depends on posthog-ios with traits: ["SessionReplay", "CrashReporting"], leaving out Surveys (PostHog/posthog-ios#916, #918). The plugin sets config.surveys = false and renders surveys in JS, so native surveys were dead weight. Replay and crash autocapture need the other two traits. Folded in from chore(react-native-plugin): leave out posthog-ios's Surveys trait #5238.
  • ios/Package.swift moves from tools 6.0 to 6.2. Traits need 6.1+, and posthog-ios 4.0 already requires Xcode 26 (Swift 6.2).
  • Only the full-SwiftPM path drops Surveys. CocoaPods has no traits and posthog.useSpm passes none, so both still get the full SDK. SwiftPM turns a trait back on if any other package depends on posthog-ios with the defaults; nothing breaks, the code just isn't dropped.
  • The plugin's Swift needs no changes for 4.0. Built locally against a merge of the 4.0 stack: examples/example-rn-native-plugin simulator Debug build succeeded with no plugin warnings once chore(react-native-plugin): drop screenshotMode for posthog-ios 4.0 #5236 is applied.

Before merging

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 (no new behavior; plugin tests and manifest check pass)
  • Accounted for the impact of any changes across different platforms
  • Accounted for backwards compatibility of any changes (no breaking changes!) (intentional: posthog-ios 4.0 needs Xcode 26; rides the plugin's 3.0 major)
  • 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)

Made with Claude Code. Split out of #5226 so that PR (Xcode 26 CI lanes) can merge now, then split again for the traits change (#5238), which is now folded back in. The 4.0 build check merged #873 with the open 4.0 PRs locally, since 4.0 isn't tagged; #907 and #916 conflict on two color-util files there, so the iOS stack needs a rebase. Not tested: the posthog.useSpm path against 4.0, Release builds, running the app.

🤖 Generated with Claude Code

@turnipdabeets turnipdabeets self-assigned this Oct 7, 2026
turnipdabeets added a commit that referenced this pull request Oct 7, 2026
posthog-ios 4.0 isn't released yet; this PR keeps only the Xcode 26 CI lanes.
posthog-ios 4.0 needs Xcode 26; package traits are left at their defaults.
@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 changed the title chore(react-native-plugin)!: require posthog-ios 4.0 and leave out its Surveys trait chore(react-native-plugin)!: require posthog-ios 4.0 Oct 7, 2026
@turnipdabeets
turnipdabeets marked this pull request as ready for review October 7, 2026 19:41
@turnipdabeets
turnipdabeets requested a review from a team as a code owner October 7, 2026 19:41
turnipdabeets added a commit that referenced this pull request Oct 7, 2026
* chore(react-native-plugin)!: require posthog-ios 4.0 and leave out its Surveys trait

The plugin disables native surveys (React Native surveys are rendered in JS),
so its Swift package depends on posthog-ios with only the SessionReplay and
CrashReporting traits. The manifest moves to tools 6.2, which posthog-ios 4.0
requires anyway and which package traits need.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* ci(react-native-plugin): build CocoaPods lanes on Xcode 26

* chore(react-native-plugin): move the posthog-ios 4.0 pin to #5237

posthog-ios 4.0 isn't released yet; this PR keeps only the Xcode 26 CI lanes.

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Surveys are rendered in JS; traits need swift-tools 6.1+, and posthog-ios 4.0 already requires Xcode 26.

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