Skip to content

chore!: note posthog-ios 4.0 feature flag payload decoding changes - #644

Closed
turnipdabeets wants to merge 7 commits into
chore/v6-posthog-ios-4from
chore/v6-ios-payload-decoding
Closed

turnipdabeets wants to merge 7 commits into
chore/v6-posthog-ios-4from
chore/v6-ios-payload-decoding

Conversation

@turnipdabeets

Copy link
Copy Markdown
Contributor

💡 Motivation and Context

Stacked on #637. Merge into chore/v6-posthog-ios-4 only if PostHog/posthog-ios#903 lands in posthog-ios 4.0. If #903 is dropped or moved out of 4.0, close this.

PostHog/posthog-ios#903 changes how posthog-ios 4.0 decodes feature flag payloads. Flutter passes the native payload straight to Dart, so v6 users see the change on iOS and macOS with no plugin code change. This PR only adds the changelog entry.

Payload Flutter iOS/macOS on 5.x Flutter iOS/macOS on 6.0 (with #903) Flutter Android
Malformed, empty or whitespace-only raw string null raw string
Bootstrapped "123" / "true" int / bool String String
Valid JSON decoded decoded decoded
  • The bootstrap change brings iOS in line with Android.
  • The malformed-payload change makes iOS differ from Android until posthog-android adopts the same sdk-specs rule. The PostHog API rejects malformed payloads when they're saved, so apps shouldn't hit this in practice.
  • Web uses posthog-js and is unchanged.

💚 How did you test it?

Changeset only, no code change. The behavior is covered by the tests in PostHog/posthog-ios#903.

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • I updated the docs if needed.
  • No breaking change or entry added to the changelog.

If releasing new changes

  • Ran pnpm changeset to generate a changeset file

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

  • Made with Claude Code while assessing how chore!: return nil for malformed feature flag payloads posthog-ios#903 affects its wrappers.
  • Checked that both native plugins pass getFeatureFlagResult(...).payload through unchanged and that the darwin plugin forwards bootstrap payloads to PostHogBootstrapConfig. Android already keeps bootstrapped strings as strings.

🤖 Generated with Claude Code

turnipdabeets and others added 6 commits October 6, 2026 20:25
- Require posthog-ios 4.x (iOS 15 minimum, Xcode 26).
- 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>
posthog-ios 4.0 raises its macOS minimum to 11 (PostHog/posthog-ios#906).
Also drops the macOS 11 / iOS 14 availability check that is now always true.

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>
posthog-ios 4.0 passes a PostHogFeatureFlagsLoaded to the
reloadFeatureFlags(_:) callback (PostHog/posthog-ios#913).

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@turnipdabeets turnipdabeets self-assigned this Oct 7, 2026
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

posthog-flutter Compliance Report

Date: 2026-10-07 01:48:59 UTC
Duration: 96720ms

✅ All Tests Passed!

45/45 tests passed


Capture Tests

✅ 29/29 tests passed

View Details
Test Status Duration
Format Validation.Event Has Required Fields ✅ 136ms
Format Validation.Event Has Uuid ✅ 117ms
Format Validation.Event Has Lib Properties ✅ 115ms
Format Validation.Distinct Id Is String ✅ 114ms
Format Validation.Token Is Present ✅ 115ms
Format Validation.Custom Properties Preserved ✅ 116ms
Format Validation.Event Has Timestamp ✅ 116ms
Retry Behavior.Retries On 503 ✅ 5331ms
Retry Behavior.Does Not Retry On 400 ✅ 2118ms
Retry Behavior.Does Not Retry On 401 ✅ 2117ms
Retry Behavior.Respects Retry After Header ✅ 8126ms
Retry Behavior.Implements Backoff ✅ 15433ms
Retry Behavior.Retries On 500 ✅ 5225ms
Retry Behavior.Retries On 502 ✅ 5225ms
Retry Behavior.Retries On 504 ✅ 5225ms
Retry Behavior.Max Retries Respected ✅ 15441ms
Deduplication.Generates Unique Uuids ✅ 124ms
Deduplication.Preserves Uuid On Retry ✅ 5224ms
Deduplication.Preserves Uuid And Timestamp On Retry ✅ 10335ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry ✅ 5231ms
Deduplication.No Duplicate Events In Batch ✅ 124ms
Deduplication.Different Events Have Different Uuids ✅ 117ms
Compression.Sends Gzip When Enabled ✅ 116ms
Batch Format.Uses Proper Batch Structure ✅ 114ms
Batch Format.Flush With No Events Sends Nothing ✅ 109ms
Batch Format.Multiple Events Batched Together ✅ 123ms
Error Handling.Does Not Retry On 403 ✅ 2115ms
Error Handling.Does Not Retry On 413 ✅ 2117ms
Error Handling.Retries On 408 ✅ 5225ms

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 ✅ 9ms
Request Payload.Flags Request Hits Flags Path Not Decide ✅ 9ms
Request Payload.Flags Request Omits Authorization Header ✅ 9ms
Request Payload.Token In Flags Body Matches Init ✅ 8ms
Request Payload.Groups Round Trip ✅ 9ms
Request Payload.Groups Default To Empty Object ✅ 8ms
Request Payload.Person Properties Distinct Id Auto Populated When Caller Omits It ✅ 8ms
Request Payload.Disable Geoip False Propagates As Geoip Disable False ✅ 8ms
Request Payload.Disable Geoip Omitted Defaults To False ✅ 9ms
Request Payload.Flag Keys To Evaluate Contains Only Requested Key ✅ 8ms
Request Lifecycle.No Flags Request On Init Alone ✅ 4ms
Request Lifecycle.No Flags Request On Normal Capture ✅ 111ms
Request Lifecycle.Two Flag Calls Produce Two Remote Requests ✅ 16ms
Request Lifecycle.Mock Response Value Is Returned To Caller ✅ 9ms
Side Effect Events.Get Feature Flag Captures Feature Flag Called Event ✅ 114ms

@turnipdabeets
turnipdabeets force-pushed the chore/v6-posthog-ios-4 branch from 5fced53 to 5022778 Compare October 7, 2026 20:01
@turnipdabeets turnipdabeets mentioned this pull request Oct 7, 2026
3 of 5 tasks
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