Repository navigation
chore!: adopt posthog-ios 4.0 and posthog-android 4.0 - #649
turnipdabeets wants to merge 7 commits into
Conversation
f4edb3d to
2e699ad
Compare
posthog-flutter Compliance ReportDate: 2026-10-30 16:31:06 UTC ✅ All Tests Passed!45/45 tests passed Capture Tests✅ 29/29 tests passed View Details
Feature_Flags Tests✅ 16/16 tests passed View Details
|
e1927f4 to
a700edb
Compare
2bf1608 to
7c1826e
Compare
|
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the |
|
Adopting posthog-ios 4.0 moves Flutter's iOS events to capture v1, but the Dart API doesn't expose |
| "posthog_flutter": major | ||
| --- | ||
|
|
||
| - **Breaking:** adopt `posthog-ios` 4.x, which requires Xcode 26 |
There was a problem hiding this comment.
Adopting posthog-ios 4 moves iOS and macOS events to capture v1, while Android stays on /batch. Can the changeset say so and link the iOS 4.0 migration guide? Proxy users need to forward /i/v1/analytics/events, stop putting their proxy auth in the Authorization header, and know that distinct IDs over 200 bytes are dropped on iOS only.
There was a problem hiding this comment.
Adopting posthog-ios 4.0 moves iOS and macOS events to capture v1 (/i/v1/analytics/events). A reverse proxy must forward the new path and the Authorization header, or events are dropped. Could the changeset say so and link the posthog-ios 4.0 migration guide, as the Windows and Linux changeset does?
There was a problem hiding this comment.
🤔 I think this was all addressed elsewhere but let me know if not - I made managed proxy cfg changes for prod, but SDK migration guides will need to call out new required header allowances, req size caps etc. suitable for capture v1 analytics and AI shaped events as prep work for users on DIY proxies
There was a problem hiding this comment.
Thanks! Flutter 6.0 adopts posthog-ios 4.0 (this PR) and posthog-android 4.0 (#663), and #673 moves Windows and Linux, so every platform moves to capture v1. I've updated the capture v1 changeset in #673 (cdaefeb) to cover all platforms. It lists what a DIY proxy needs: forward /i/v1/analytics/events and /i/v1/ai/events, pass Authorization, the PostHog-* headers, Content-Type, Content-Encoding and User-Agent through unchanged, and accept request bodies up to 20 MB. It also links the native migration guides, which are still in review:
7c1826e to
a942bb0
Compare
a700edb to
c3150c0
Compare
c3150c0 to
713e973
Compare
c322313 to
852c2c9
Compare
|
@eli-r-ph Thanks, agreed that we shouldn't ship v1 without its APIs. #674 adds them in 6.0: |
- Require posthog-ios 4.x. - Adapt to the reloadFeatureFlags(_:) callback that now passes a PostHogFeatureFlagsLoaded (PostHog/posthog-ios#913). - Note the payload decoding changes from PostHog/posthog-ios#903. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
PostHog/posthog-ios#905 removes the legacy version/build properties from lifecycle events in 4.0, so Flutter iOS and macOS apps stop sending them. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…listener posthog-ios 4.0 removes the didReceiveFeatureFlags notification.
* chore!: adopt posthog-android 4.0 * chore!: pass the loaded flags to onFeatureFlags and reloadFeatureFlags (#664) * chore!: pass the loaded flags to onFeatureFlags and reloadFeatureFlags onFeatureFlags and reloadFeatureFlags now carry a PostHogFeatureFlagsLoaded with the enabled flags, their values and whether loading failed, matching posthog-ios 4.0 and posthog-android 4.0. On web, reloadFeatureFlags completes right away with the flags loaded so far, because posthog-js doesn't report when a reload finishes. * fix: complete the web reloadFeatureFlags with the reloaded flags Wait for the next posthog-js onFeatureFlags call instead of returning the flags already loaded, so a failed reload reports errorsLoading. Complete right away when flags are disabled, and after twice the flags request timeout when posthog-js skips the request without calling back. * chore: use PostHogFeatureFlagsCallback from posthog-android 4.0 * chore: fix ktlint function-signature * fix: await posthog-js reloadFeatureFlagsAsync on web The next onFeatureFlags callback can carry a response from a request already in flight, so reloadFeatureFlags() could complete with flags from before the reload. posthog-js 1.438.2+ settles reloadFeatureFlagsAsync() after this reload's own request; use it when present and keep the callback path for older posthog-js. * docs: pass the loaded flags in the setup example * docs: drop best-effort web note from the person and group property methods * fix(web): wait for posthog-js flags retries before reporting a reload failure posthog-js retries a timed-out /flags request once by default, 500 ms later, inside the same reload. The older-JS deadline of twice the request timeout reported cached flags with errorsLoading set before a successful retry landed. * docs: note where onFeatureFlags and errorsLoading differ on Android and web * docs: describe the older posthog-js reload timeout as the full retry budget Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…s into one changeset Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fd88c7e to
7eebbca
Compare
posthog-android 4.0 drops RRStyle and the wireframe tree fields from the internal RRWireframe; screenshot frames don't need a style. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
💡 Motivation and Context
Stacked on #637. This is the part of v6 that needs the posthog-ios 4.0 and posthog-android 4.0 majors, split out so #637 can pass CI against the 3.x SDKs. Merge this once both are released.
onFeatureFlagsfrom the posthog-iosonFeatureFlagslistener, since 4.0 removes thedidReceiveFeatureFlagsnotification[4.0.0,5.0.0)(chore!: adopt posthog-android 4.0 #663). The plugin calls none of the APIs 4.0 removesPostHogFeatureFlagsLoaded(enabled flags, their values,errorsLoading) toPostHogConfig.onFeatureFlagsand return it fromreloadFeatureFlags()on every platform (chore!: pass the loaded flags to onFeatureFlags and reloadFeatureFlags #664, closes Add full onFeatureFlags callback with flags, variants, and error state #231). This matches posthog-ios 4.0 (feat: add public onFeatureFlags listener with flags, variants and error state posthog-ios#897, #913), posthog-android 4.0 (chore!: pass the load result to the feature flags callback posthog-android#877) and posthog-js. On web,reloadFeatureFlags()awaits posthog-jsreloadFeatureFlagsAsync()(1.438.2+). With older posthog-js it waits for the nextonFeatureFlagscall, with a timeout that covers posthog-js retriesonFeatureFlags/reloadFeatureFlags()typesversion/buildproperties on lifecycle events (chore!: drop legacy version and build from lifecycle events posthog-ios#905). Android keeps sending them for now💚 How did you test it?
Package.swifttemporarily at the local checkout with.package(path:). The plugin produced no warnings, including for the@Sendablecallback from chore!: mark off-main public callbacks @Sendable for v4 posthog-ios#914. Not tested locally: the CocoaPods build.flutter analyze,flutter test,scripts/check-api-dart.sh(snapshot updated), new method-channel, desktop and web handler tests,flutter build web, and Chrome checks of the web reload path.📝 Checklist
If releasing new changes
pnpm changesetto generate a changeset file🤖 Agent context
Autonomy: Human-driven (agent-assisted)
🤖 Generated with Claude Code