Skip to content

chore!: Flutter Major Release v6 - #637

Open
turnipdabeets wants to merge 7 commits into
mainfrom
chore/v6-posthog-ios-4
Open

turnipdabeets wants to merge 7 commits into
mainfrom
chore/v6-posthog-ios-4

Conversation

@turnipdabeets

@turnipdabeets turnipdabeets commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

💡 Motivation and Context

This is the base PR for posthog_flutter 6.0.0. It raises the iOS and macOS minimums to match posthog-ios 4.0 and removes the APIs we had already marked for removal in the next major.

It still depends on posthog-ios 3.x (>= 3.84.0, < 4.0.0), so CI can pass before 4.0 is published. Adopting posthog-ios 4.0 (PostHog/posthog-ios#873), with its 4.x range, Xcode 26 requirement and iOS behavior changes, is in the stacked #649.

Merge order: merge #649 into this branch once posthog-ios 4.0 is published, then merge this PR into main. Merging this PR first would line up a 6.0.0 release that still uses posthog-ios 3.x, because publish.yml runs on every changeset push to main.

iOS and macOS minimums

  • iOS deployment target raised from 13.0 to 15.0, and macOS from 10.15 to 11.0 to match posthog-ios 4.0 (PostHog/posthog-ios#906). Over the last 30 days, posthog-ios saw 4 events from macOS 10.15 across PostHog Cloud. Also dropped the #available(iOS 14.0, macOS 11.0, *) check around the push-open prewarm, which the new minimums make always true
  • Example app's iOS target is now 15.0
  • codeql.yml moved from Xcode 16.4 to 26.4
  • Removed .cellular from the iOS dataMode mapping, and dropped the #available(iOS 15.0, *) check around surveys, which the new minimum makes always true

Removed deprecated APIs

  • PostHogConfig.apiKey, the apiKey setup alias, and the com.posthog.posthog.API_KEY manifest/Info.plist fallback (Android and iOS)
  • Posthog().getFeatureFlagPayload(): removed from Dart, the platform interface, web and both native handlers
  • The PostHogConfig.debouncerDelay setter
  • PostHogDataMode.cellular

Android minSdk

  • minSdkVersion goes from 21 to 23. The plugin depends on posthog-android [3.71.0, 4.0.0), and posthog-android has required minSdk 23 since 3.39.0 (chore: upgrade to Kotlin 2.1.10, AGP 8.9.1, compileSdk 36, minSdk 23 posthog-android#460). An app on minSdk 21 or 22 already fails Gradle's manifest merge on that dependency, so the old 21 was stale. This doesn't change who can build, so it isn't listed as breaking. It only makes the plugin declare the floor it already has. 23 also matches Datadog's and Firebase's Flutter plugins.

Merged into this branch

Deliberately excluded

💚 How did you test it?

  • flutter analyze, flutter test (781 pass), dart format --set-exit-if-changed, scripts/check-api-dart.sh
  • Android: ktlint, flutter build apk (re-run after the minSdk 23 change), ./gradlew :posthog_flutter:testDebugUnitTest
  • iOS and macOS: CI builds the plugin with CocoaPods and SPM against posthog-ios 3.x. The posthog-ios 4.0 build is verified in chore!: adopt posthog-ios 4.0 #649.

📝 Checklist

If releasing new changes

  • Ran pnpm changeset to generate a changeset file

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

  • Made with Claude Code.
  • Scope: anything that could ship in a minor was kept out of this major.
  • posthog-ios 4.0 adoption is in the stacked chore!: adopt posthog-ios 4.0 #649.

🤖 Generated with Claude Code

@turnipdabeets turnipdabeets self-assigned this Oct 3, 2026
@greptile-apps

greptile-apps Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Retrigger

[High risk] Upgrades PostHog iOS SDK and removes deprecated APIs.

The reviewed changes appear safe to merge, with one non-blocking release-note correction.

Reviews (1) · Last reviewed commit: "chore!: adopt posthog-ios 4.0 and remove..."

Comment thread .changeset/v6-posthog-ios-4.md Outdated
@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

posthog-flutter Compliance Report

Date: 2026-10-08 15:50:01 UTC
Duration: 96914ms

✅ All Tests Passed!

45/45 tests passed


Capture Tests

✅ 29/29 tests passed

View Details
Test Status Duration
Format Validation.Event Has Required Fields ✅ 146ms
Format Validation.Event Has Uuid ✅ 121ms
Format Validation.Event Has Lib Properties ✅ 118ms
Format Validation.Distinct Id Is String ✅ 116ms
Format Validation.Token Is Present ✅ 116ms
Format Validation.Custom Properties Preserved ✅ 118ms
Format Validation.Event Has Timestamp ✅ 119ms
Retry Behavior.Retries On 503 ✅ 5332ms
Retry Behavior.Does Not Retry On 400 ✅ 2118ms
Retry Behavior.Does Not Retry On 401 ✅ 2119ms
Retry Behavior.Respects Retry After Header ✅ 8127ms
Retry Behavior.Implements Backoff ✅ 15456ms
Retry Behavior.Retries On 500 ✅ 5225ms
Retry Behavior.Retries On 502 ✅ 5229ms
Retry Behavior.Retries On 504 ✅ 5226ms
Retry Behavior.Max Retries Respected ✅ 15448ms
Deduplication.Generates Unique Uuids ✅ 132ms
Deduplication.Preserves Uuid On Retry ✅ 5228ms
Deduplication.Preserves Uuid And Timestamp On Retry ✅ 10335ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry ✅ 5231ms
Deduplication.No Duplicate Events In Batch ✅ 125ms
Deduplication.Different Events Have Different Uuids ✅ 118ms
Compression.Sends Gzip When Enabled ✅ 117ms
Batch Format.Uses Proper Batch Structure ✅ 115ms
Batch Format.Flush With No Events Sends Nothing ✅ 109ms
Batch Format.Multiple Events Batched Together ✅ 125ms
Error Handling.Does Not Retry On 403 ✅ 2117ms
Error Handling.Does Not Retry On 413 ✅ 2118ms
Error Handling.Retries On 408 ✅ 5226ms

Feature_Flags Tests

✅ 16/16 tests passed

View Details
Test Status Duration
Request Payload.Request With Person Properties Device Id ✅ 13ms
Request Payload.Flags Request Uses V2 Query Param ✅ 10ms
Request Payload.Flags Request Hits Flags Path Not Decide ✅ 10ms
Request Payload.Flags Request Omits Authorization Header ✅ 9ms
Request Payload.Token In Flags Body Matches Init ✅ 9ms
Request Payload.Groups Round Trip ✅ 11ms
Request Payload.Groups Default To Empty Object ✅ 10ms
Request Payload.Person Properties Distinct Id Auto Populated When Caller Omits It ✅ 11ms
Request Payload.Disable Geoip False Propagates As Geoip Disable False ✅ 10ms
Request Payload.Disable Geoip Omitted Defaults To False ✅ 10ms
Request Payload.Flag Keys To Evaluate Contains Only Requested Key ✅ 10ms
Request Lifecycle.No Flags Request On Init Alone ✅ 5ms
Request Lifecycle.No Flags Request On Normal Capture ✅ 114ms
Request Lifecycle.Two Flag Calls Produce Two Remote Requests ✅ 19ms
Request Lifecycle.Mock Response Value Is Returned To Caller ✅ 11ms
Side Effect Events.Get Feature Flag Captures Feature Flag Called Event ✅ 118ms

@turnipdabeets
turnipdabeets force-pushed the chore/v6-posthog-ios-4 branch 3 times, most recently from b996dea to 047d564 Compare October 5, 2026 17:19
@turnipdabeets
turnipdabeets marked this pull request as ready for review October 6, 2026 22:09
@turnipdabeets
turnipdabeets requested a review from a team as a code owner October 6, 2026 22:09
@turnipdabeets turnipdabeets changed the title chore!: adopt posthog-ios 4.0 and remove deprecated APIs for v6 chore!: Flutter Major Release v6 Oct 7, 2026
@turnipdabeets
turnipdabeets force-pushed the chore/v6-posthog-ios-4 branch from 0ae4f04 to 9279d41 Compare October 7, 2026 00:31
@turnipdabeets
turnipdabeets force-pushed the chore/v6-posthog-ios-4 branch from 5fced53 to 5022778 Compare October 7, 2026 20:01
turnipdabeets and others added 6 commits October 8, 2026 11:43
- Remove PostHogConfig.apiKey and the API_KEY manifest/Info.plist fallback.
- Remove getFeatureFlagPayload() across Dart, web and native handlers.
- Remove the debouncerDelay setter and PostHogDataMode.cellular.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
posthog-android has required minSdk 23 since 3.39.0, and the plugin's
dependency range [3.71.0, 4.0.0) only resolves to versions that need it.
Apps below 23 already fail the manifest merge, so this only corrects the
declared value.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Removes the names deprecated in 5.x in favor of optIn/optOut and
sendFeatureFlagEvent.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…#647)

Matches PostHogConfig.sendFeatureFlagEvent and the iOS/Android
getFeatureFlagResult parameter. The method-channel key stays 'sendEvent'.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* chore!: rename platform enable/disable to optIn/optOut

PosthogFlutterPlatformInterface.enable()/disable() become optIn()/optOut()
to match the public Posthog API renamed in #636/#638. The method-channel
names sent to native stay 'enable'/'disable'.

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

* docs(changeset): cover direct platform callers in the opt-in/out rename

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

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
toMap() on the config classes and PostHogFeatureFlagResult.fromMap()
are the platform-channel wire format, not a user-facing data shape.
Move them to extensions and a top-level function in an unexported
src/utils/channel_serialization.dart so they drop out of the public API.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Raises the deployment targets to the posthog-ios 4.0 minimums ahead of
the SDK bump, so the bump itself only changes the dependency range.
Drops the availability checks that are now always true and moves the
CodeQL Swift job to Xcode 26.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@turnipdabeets
turnipdabeets force-pushed the chore/v6-posthog-ios-4 branch from e1927f4 to a700edb Compare October 8, 2026 15:45

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.

1 participant