Skip to content

chore: update text and names left stale by the 4.0 changes - #910

Merged
turnipdabeets merged 1 commit into
chore/v4-remove-deprecatedfrom
chore/v4-stale-text
Oct 6, 2026
Merged

turnipdabeets merged 1 commit into
chore/v4-remove-deprecatedfrom
chore/v4-stale-text

Conversation

@turnipdabeets

@turnipdabeets turnipdabeets commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

💡 Motivation and Context

Part of the 4.0 stack, on top of #873. This updates text and internal names that #873's changes (iOS 15 minimum, Swift tools 6.2, apiKey removal) left stale. No behavior change.

  • Surveys: the @available(..., unavailable) messages on PostHogConfig.surveys and surveysConfig now say "Surveys are only available on iOS". The "15+" is redundant now that iOS 15 is the minimum.
  • PostHogEvent.apiKey → projectToken: the internal property and init label now use the public name. The wire field stays api_key, which is what the server expects.
  • Setup log: "projectToken or apiKey is empty" now says "projectToken is empty".
  • sdk_compliance_adapter: the README and run_tests.sh now require Swift 6.2+, to match the SDK's swift-tools-version:6.2.

apiKey / api_key that stays

Where Why
"api_key" in event, batch, flags and snapshot JSON It's the field name the server expects.
PostHogConfig.projectToken doc: "formerly named apiKey" Migration hint.
scripts/downgrade-compatibility-smoke PostHogConfig(apiKey:) It compiles against 3.48.0 on purpose.
sdk_compliance_adapter api_key It's the compliance harness's request format.
POSTHOG_PROJECT_API_KEY in release.yml CI secret name.

Left alone on purpose

  • s.swift_versions = "5.3" in the podspec. That's the Swift language mode, which is still 5 (swiftLanguageModes: [.v5]).
  • The watchOS 9.0 clause in PostHogContext's $locale check. It only becomes redundant with chore!: raise minimum macOS to 11, tvOS to 15 and watchOS to 10 #906's watchOS 10 minimum.
  • sdk_compliance_adapter/Dockerfile still uses swift:5.9 images. That can't resolve a 6.2-tools package, but changing it is a functional change I haven't verified with Docker, so it's left for a follow-up.

💚 How did you test it?

  • xcodebuild build for iOS and watchOS succeeds.
  • make test (macOS): all 169 XCTest tests pass. Swift Testing has 13 issues in PostHogStorage app-group tests, which fail the same way on the base branch (macOS blocks access to the app-group container on my machine). One run also failed re-registering a different token after delivery sends again, which passed 5 times out of 5 when run on its own.

📝 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.

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

  • Made with Claude Code, from an audit for leftover code in the 4.0 release work.

🤖 Generated with Claude Code

@turnipdabeets turnipdabeets self-assigned this Oct 6, 2026
@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

posthog-ios Compliance Report

Date: 2026-10-06 13:56:42 UTC
Duration: 218324ms

⚠️ Some Tests Failed

44/45 tests passed, 1 failed


Capture Tests

⚠️ 28/29 tests passed, 1 failed

View Details
Test Status Duration
Format Validation.Event Has Required Fields ✅ 2884ms
Format Validation.Event Has Uuid ✅ 2872ms
Format Validation.Event Has Lib Properties ✅ 375ms
Format Validation.Distinct Id Is String ✅ 2749ms
Format Validation.Token Is Present ✅ 293ms
Format Validation.Custom Properties Preserved ✅ 2739ms
Format Validation.Event Has Timestamp ✅ 2754ms
Retry Behavior.Retries On 503 ✅ 5346ms
Retry Behavior.Does Not Retry On 400 ✅ 4788ms
Retry Behavior.Does Not Retry On 401 ✅ 4677ms
Retry Behavior.Respects Retry After Header ✅ 7713ms
Retry Behavior.Implements Backoff ✅ 21723ms
Retry Behavior.Retries On 500 ✅ 9352ms
Retry Behavior.Retries On 502 ✅ 5483ms
Retry Behavior.Retries On 504 ✅ 5798ms
Retry Behavior.Max Retries Respected ❌ 22044ms
Deduplication.Generates Unique Uuids ✅ 3293ms
Deduplication.Preserves Uuid On Retry ✅ 9270ms
Deduplication.Preserves Uuid And Timestamp On Retry ✅ 16795ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry ✅ 7800ms
Deduplication.No Duplicate Events In Batch ✅ 3015ms
Deduplication.Different Events Have Different Uuids ✅ 3011ms
Compression.Sends Gzip When Enabled ✅ 2714ms
Batch Format.Uses Proper Batch Structure ✅ 418ms
Batch Format.Flush With No Events Sends Nothing ✅ 331ms
Batch Format.Multiple Events Batched Together ✅ 2847ms
Error Handling.Does Not Retry On 403 ✅ 4785ms
Error Handling.Does Not Retry On 413 ✅ 4712ms
Error Handling.Retries On 408 ✅ 9296ms

Failures

retry_behavior.max_retries_respected

Expected 4 requests, got 6

Feature_Flags Tests

✅ 16/16 tests passed

View Details
Test Status Duration
Request Payload.Request With Person Properties Device Id ✅ 2972ms
Request Payload.Flags Request Uses V2 Query Param ✅ 2789ms
Request Payload.Flags Request Hits Flags Path Not Decide ✅ 2919ms
Request Payload.Flags Request Omits Authorization Header ✅ 2831ms
Request Payload.Token In Flags Body Matches Init ✅ 2983ms
Request Payload.Groups Round Trip ✅ 2845ms
Request Payload.Groups Default To Empty Object ✅ 2988ms
Request Payload.Person Properties Distinct Id Auto Populated When Caller Omits It ✅ 2884ms
Request Payload.Disable Geoip False Propagates As Geoip Disable False ✅ 2976ms
Request Payload.Disable Geoip Omitted Defaults To False ✅ 2889ms
Request Payload.Flag Keys To Evaluate Contains Only Requested Key ✅ 2881ms
Request Lifecycle.No Flags Request On Init Alone ✅ 109ms
Request Lifecycle.No Flags Request On Normal Capture ✅ 2926ms
Request Lifecycle.Two Flag Calls Produce Two Remote Requests ✅ 6384ms
Request Lifecycle.Mock Response Value Is Returned To Caller ✅ 3002ms
Side Effect Events.Get Feature Flag Captures Feature Flag Called Event ✅ 3089ms

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@turnipdabeets turnipdabeets changed the title chore: update text left stale by the 4.0 changes chore: update text and names left stale by the 4.0 changes Oct 6, 2026
@turnipdabeets
turnipdabeets changed the base branch from chore/v4-raise-apple-platform-minimums to chore/v4-remove-deprecated October 6, 2026 13:44
@turnipdabeets
turnipdabeets marked this pull request as ready for review October 6, 2026 13:57
@turnipdabeets
turnipdabeets requested a review from a team as a code owner October 6, 2026 13:57
@turnipdabeets
turnipdabeets merged commit e1cc8cf into chore/v4-remove-deprecated Oct 6, 2026
47 of 71 checks passed
@turnipdabeets
turnipdabeets deleted the chore/v4-stale-text branch October 6, 2026 22:13
turnipdabeets added a commit that referenced this pull request Oct 7, 2026
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
turnipdabeets added a commit that referenced this pull request Oct 9, 2026
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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