Repository navigation
chore!: publish 4.0 to Swift Package Manager only - #972
Merged
Merged
Conversation
Stop publishing to CocoaPods: CocoaPods trunk goes read-only on 2026-12-02, and pod builds always compile every package trait in. Remove the release workflow's CocoaPods publish job, the podspec lint and pod example CI jobs, PostHogExampleWithPods, PostHog.podspec and the pod Makefile targets. Document SPM-only distribution in README, RELEASING and the 4.0 changeset; 3.x stays on CocoaPods. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 of 15 tasks
Contributor
posthog-ios Compliance ReportDate: 2026-10-27T18:51:27.630402+00:00
|
| Test | Status | Duration |
|---|---|---|
| Format Validation.Event Has Required Fields | ✅ | 2935ms |
| Format Validation.Event Has Uuid | ✅ | 2966ms |
| Format Validation.Event Has Lib Properties | ✅ | 2882ms |
| Format Validation.Distinct Id Is String | ✅ | 2870ms |
| Format Validation.Token Is Present | ✅ | 2783ms |
| Format Validation.Custom Properties Preserved | ✅ | 2860ms |
| Format Validation.Event Has Timestamp | ✅ | 2731ms |
| Format Validation.Non Utc Event Timestamp Is Converted To Utc | ✅ | 2792ms |
| Retry Behavior.Retries On 503 | ✅ | 11217ms |
| Retry Behavior.Does Not Retry On 400 | ✅ | 4778ms |
| Retry Behavior.Does Not Retry On 401 | ✅ | 4672ms |
| Retry Behavior.Respects Retry After Header | ✅ | 5408ms |
| Retry Behavior.Implements Backoff | ✅ | 21222ms |
| Retry Behavior.Retries On 500 | ✅ | 9336ms |
| Retry Behavior.Retries On 502 | ✅ | 9339ms |
| Retry Behavior.Retries On 504 | ✅ | 5364ms |
| Retry Behavior.Max Retries Respected | ❌ | 21885ms |
| Deduplication.Generates Unique Uuids | ✅ | 2975ms |
| Deduplication.Preserves Uuid On Retry | ✅ | 5428ms |
| Deduplication.Preserves Uuid And Timestamp On Retry | ✅ | 10368ms |
| Deduplication.Preserves Uuid And Timestamp On Batch Retry | ✅ | 7734ms |
| Deduplication.No Duplicate Events In Batch | ✅ | 2912ms |
| Deduplication.Different Events Have Different Uuids | ✅ | 2842ms |
| Compression.Sends Gzip When Enabled | ✅ | 376ms |
| Batch Format.Uses Proper Batch Structure | ✅ | 2785ms |
| Batch Format.Flush With No Events Sends Nothing | ✅ | 314ms |
| Batch Format.Multiple Events Batched Together | ✅ | 2875ms |
| Error Handling.Does Not Retry On 403 | ✅ | 4660ms |
| Error Handling.Does Not Retry On 413 | ✅ | 4800ms |
| Error Handling.Retries On 408 | ✅ | 9212ms |
Failures
retry_behavior.max_retries_respected
Expected 4 requests, got 6
Feature_Flags Tests
✅ 17/17 tests passed
View Details
| Test | Status | Duration |
|---|---|---|
| Request Payload.Request With Person Properties Device Id | ✅ | 2830ms |
| Request Payload.Flags Request Uses V2 Query Param | ✅ | 2806ms |
| Request Payload.Flags Request Hits Flags Path Not Decide | ✅ | 2690ms |
| Request Payload.Flags Request Omits Authorization Header | ✅ | 2800ms |
| Request Payload.Token In Flags Body Matches Init | ✅ | 2749ms |
| Request Payload.Groups Round Trip | ✅ | 2827ms |
| Request Payload.Groups Default To Empty Object | ✅ | 2948ms |
| Request Payload.Disable Geoip False Propagates As Geoip Disable False | ✅ | 2809ms |
| Request Payload.Disable Geoip Omitted Defaults To False | ✅ | 2735ms |
| Request Payload.Flag Keys To Evaluate Contains Only Requested Key | ✅ | 2700ms |
| Request Lifecycle.No Flags Request On Init Alone | ✅ | 129ms |
| Request Lifecycle.No Flags Request On Normal Capture | ✅ | 2874ms |
| Request Lifecycle.Two Flag Calls Produce Two Remote Requests | ✅ | 5532ms |
| Request Lifecycle.Mock Response Value Is Returned To Caller | ✅ | 2700ms |
| Retry Behavior.Retries Flags On 502 | ✅ | 2757ms |
| Retry Behavior.Retries Flags On 504 | ✅ | 2885ms |
| Side Effect Events.Get Feature Flag Captures Feature Flag Called Event | ✅ | 3284ms |
turnipdabeets
marked this pull request as ready for review
October 27, 2026 17:20
This was referenced Oct 27, 2026
… tmp-972 # Conflicts: # PostHogExampleWithPods/PostHogExampleWithPods/AppDelegate.swift
dustinbyrne
approved these changes
Oct 27, 2026
dustinbyrne
left a comment
Contributor
There was a problem hiding this comment.
Re-reviewed the updated snapshot. The CocoaPods withdrawal remains consistent across packaging, retained integrations, release automation and migration documentation, with the intentional break covered by the major changeset. No actionable findings.
AI-assisted review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
💡 Motivation and Context
Follow-up to #873, addressing ioannisj's review question there (#873) on whether 4.0 should still ship on CocoaPods. Decision: 4.0 ships on Swift Package Manager only. 3.x stays on CocoaPods until trunk locks.
What changes
release.ymlpublish-cocoapodsjobnotify-releasednow waits oncreate-github-release, which is the last publishing step (SPM resolves from the tag). Dropped the "tag before CocoaPods publish" comment.build.ymlpodspec-lintjob ("CocoaPods package lint")build.ymlmin-toolchain job: CocoaPods install + "Build SDK with Swift 5 language mode via CocoaPods" stepsbuildSdkSpm,buildSdkSpmNoTraits). Swift 5 mode is still covered:Package.swiftsetsswiftLanguageModes: [.v5]and the Xcode project buildsPostHogwithSWIFT_VERSION = 5.0.build-examples.ymlbuild-podsmatrix (static lib, static lib on Xcode 26.0.1, static framework, dynamic framework)PostHogExampleWithPods/+ its scheme + its reference inPostHog.xcodeprojPostHog.podspec, so it can't build without one.PostHog.podspecbump-version.shkept stamping 4.x versions on it. Keeping it would also invitepod 'PostHog', :git =>installs of 4.x, which compile every trait in, the thing we're moving away from. It doesn't help the wrappers either: their podspecs depend onPostHogthrough trunk, which can't serve 4.x. 3.x keeps its podspec at every 3.x tag, so a pre-lock 3.x fix can still be pushed from a branch cut from the last 3.x tag.releaseCocoaPods,buildExamplePods*,gem install cocoapodsinbootstrapbuildExamplesno longer includes pods.scripts/bump-version.shpodspec line,PostHogVersion.swiftcomment,.swiftlint.ymlexclusion,upload-symbols.shusage commentsPODS_ROOTreferences; the symbol-upload examples now use the SPM path.RELEASING.md3.92.5tag); deleteCOCOAPODS_TRUNK_TOKENonce no more 3.x pods are planned.README.md,CONTRIBUTING.md,AGENTS.md.changeset/v4-major-release.md**Breaking:**entry. No new changeset file.Not changed: no
deprecatedflag on the pod (it would warn every React Native and Flutter app that gets the pod through a wrapper). 3.x pods on trunk are untouched.Open question for reviewers: the release workflow only runs on
main, so once this lands there's no automated 3.x pod release. The RELEASING.md wording assumes a manual push from a 3.x branch before the lock is enough. Say if you'd rather have a workflow for it.Cost for the wrapper SDKs
React Native plugin (
posthog-jspackages/react-native-plugin): its podspec resolves posthog-ios from CocoaPods trunk by default (s.dependency 'PostHog', "~> #{posthog_ios_version}", currently3.88.2). SPM is opt-in through"posthog.useSpm": "true"inios/Podfile.properties.json, which calls RN'sspm_dependencyhelper. Since trunk can't serve 4.x, adopting posthog-ios 4.0 means:install_modules_dependencies/min_ios_version_supported) to 0.75 (spm_dependency).spm_dependency, and Expo needs noexpo-build-propertieschange (verified in chore(react-native-plugin)!: resolve posthog-ios through Swift Package Manager posthog-js#5449, despite the old podspec comment).posthog_flutter needs the same check. It ships both a podspec (
s.dependency 'PostHog', '>= 3.84.0', '< 4.0.0') and aPackage.swift("3.84.0" ..< "4.0.0"). Apps that resolve plugins through CocoaPods can't get 4.x, so its major that adopts 4.0 has to require Flutter's Swift Package Manager integration and raise its iOS 13.0 / macOS 10.15 minimums. I didn't check which integration Flutter uses by default across posthog_flutter's supported range (flutter: >=3.27.0).Both were read from the
mainbranches of posthog-js and posthog-flutter; neither repo is changed here.💚 How did you test it?
actionlint1.7.12 onrelease.yml,build.yml,build-examples.yml: no new findings. The two shellcheck notes it prints (SC2010, SC2143 in thecheck-changesetsstep) are already on the base branch.make buildSdk: passes (Xcode project builds for iOS, macOS, Mac Catalyst, tvOS, watchOS and visionOS, plusbuildSdkSpmandbuildSdkSpmNoTraits). This covers thePostHog.xcodeprojedit.make lint: passes (32 existing warnings, 0 serious).plutil -lint PostHog.xcodeproj/project.pbxproj: OK. NoPostHogExampleWithPodsreferences left in the repo besidesCHANGELOG.md.git diff --check: clean.RELEASING.mdat tag3.92.5has the# CocoaPods Managementheading the new link points to. The Swift Package Index shields badges (the existing Swift versions one and the new platforms one) both rendered "pending" when I checked.main), and the CI jobs I removed.📝 Checklist
If releasing new changes
pnpm changesetto generate a changeset fileEdited the existing
.changeset/v4-major-release.mdinstead of adding a new changeset.🤖 Agent context
Autonomy: Human-driven (agent-assisted)
make buildSdkcouldn't run in the agent's git worktree because the example projects reference the package as../../posthog-ios(the directory has to be namedposthog-ios). It ran on a copy of this branch's files in a directory namedposthog-ios.🤖 Generated with Claude Code