Skip to content

chore: remove the podspec and CocoaPods CI - #697

Merged
turnipdabeets merged 1 commit into
chore/v6-posthog-ios-4from
chore/v6-remove-podspec
Nov 3, 2026
Merged

turnipdabeets merged 1 commit into
chore/v6-posthog-ios-4from
chore/v6-remove-podspec

Conversation

@turnipdabeets

@turnipdabeets turnipdabeets commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

💡 Motivation and Context

Once #673 lands, the podspec needs PostHog >= 4.0.0, which isn't on CocoaPods, and the 6.0 guide already says posthog_flutter has no podspec. This PR removes it, so that guide line is now true. It follows eli-r-ph's review of #673, and the base is #637's branch. PRs on #673 conflict on the podspec until this lands: keep the delete.

  • Removes posthog_flutter/darwin/posthog_flutter.podspec and the build-apple CocoaPods jobs.
  • Moves the iOS RunnerTests step to the SPM job.
  • Removes Podfile.local from the example and from CONTRIBUTING.md, which now describes the local override through Package.swift. Podfile.local couldn't affect a Swift package.
  • Keeps the example Podfile and CodeQL's pod install, because google_maps needs them.

package_manager: [spm] stays in the matrix, so the required build-apple (ios, spm) and build-apple (macos, spm) names don't change.

⚠️ Admin action needed

Required checks on main (ruleset 11273241) to remove:

  • build-apple (ios, cocoapods)
  • build-apple (macos, cocoapods)

When: after this change reaches chore/v6-posthog-ios-4 through #673, and before #637 merges to main. #637 can't pass those checks without this, because the jobs no longer report. The feature branches in this stack have no required checks, so nothing blocks earlier.

💚 How did you test it?

Run on Flutter 3.41.9 with CocoaPods 1.15.2, in scratch copies. SPM builds used a local posthog-ios feat/v4-capture-v1, because no 4.x tag exists yet.

Scenario Without the podspec
App, SPM off, flutter build ios or macos Stops with Plugin posthog_flutter is only compatible with Swift Package Manager
Example app (google_maps pod), SPM on, flutter build ios and macos Builds
flutter pub publish --dry-run 0 warnings
Add-to-app module, flutter build ios-framework Stops with Unable to find a specification for posthog_flutter and misleading pod repo update advice (accepted)
Existing CocoaPods app, bare pod install Exits 0 and skips the plugin. flutter build still stops with the SPM error above

RunnerTests is not confirmed under SPM. The local runs never executed a test: the simulator failed with a device clone error, then a run on a fixed device timed out with the simulator unreachable. CI can't confirm it either until posthog-ios 4.x is tagged, because the build-apple jobs already fail resolving that package. Check this step on the first green build-apple (ios, spm) run.

build-apple and build-android were already red on #673.

🧪 How to test locally (for agents and reviewers)

CI's build-android and build-apple jobs can't pass until posthog-ios and posthog-android 4.0 are released, because no 4.x version resolves yet. To test now, build against the native feat/v4-capture-v1 branches. Don't commit these overrides.

Android: check out feat/v4-capture-v1 of posthog-android, then:

sed -i '' -E 's/^coreVersion=.*/coreVersion=7.99.0/; s/^androidVersion=.*/androidVersion=4.99.0/' gradle.properties
./gradlew :posthog:publishToMavenLocal :posthog-android:publishToMavenLocal -x signMavenPublication

Add mavenLocal() as the first repository in example/android/build.gradle.kts. Use a new version for each republish, because Gradle can reuse a stale one.

iOS/macOS: check out feat/v4-capture-v1 of posthog-ios and point posthog_flutter/darwin/posthog_flutter/Package.swift at it:

.package(name: "posthog-ios", path: "/absolute/path/to/posthog-ios"),

Build: from example/, with Swift Package Manager enabled (flutter config --enable-swift-package-manager), run flutter build apk --debug and flutter build ios --simulator --debug.

Local server: set config.host to http://127.0.0.1:<port>.

  • Android: add android:usesCleartextTraffic="true" to <application> and run adb reverse tcp:<port> tcp:<port>.
  • iOS: set NSAppTransportSecurity > NSAllowsArbitraryLoads in Runner/Info.plist.
  • Server: use HTTP/1.1, and return {"hasFeatureFlags": true} from /array/<token>/config. Otherwise Android skips /flags and reports empty flags.

Run tests on a device with flutter test integration_test/<file>.dart -d <device>.

What to check on this PR: the example builds with SPM on the platforms above. build-apple CocoaPods jobs are removed here, so only the SPM jobs apply.

📝 Checklist

  • All commits are signed (see Commit signing)
  • 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)

Written with Claude Code at Anna's direction. Anna chose removal over a podspec that raises a message, and accepted the add-to-app error. No new changeset, because v6-major-release.md already lists the CocoaPods removal.

🤖 Generated with Claude Code

@turnipdabeets turnipdabeets self-assigned this Nov 2, 2026
@turnipdabeets
turnipdabeets requested a review from a team as a code owner November 2, 2026 18:13
@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

posthog-flutter Compliance Report

Date: 2026-11-02 20:59:02 UTC
Duration: 96732ms

✅ All Tests Passed!

45/45 tests passed


Capture Tests

✅ 29/29 tests passed

View Details
Test Status Duration
Format Validation.Event Has Required Fields ✅ 138ms
Format Validation.Event Has Uuid ✅ 119ms
Format Validation.Event Has Lib Properties ✅ 114ms
Format Validation.Distinct Id Is String ✅ 114ms
Format Validation.Token Is Present ✅ 116ms
Format Validation.Custom Properties Preserved ✅ 116ms
Format Validation.Event Has Timestamp ✅ 116ms
Retry Behavior.Retries On 503 ✅ 5329ms
Retry Behavior.Does Not Retry On 400 ✅ 2116ms
Retry Behavior.Does Not Retry On 401 ✅ 2117ms
Retry Behavior.Respects Retry After Header ✅ 8123ms
Retry Behavior.Implements Backoff ✅ 15444ms
Retry Behavior.Retries On 500 ✅ 5224ms
Retry Behavior.Retries On 502 ✅ 5225ms
Retry Behavior.Retries On 504 ✅ 5224ms
Retry Behavior.Max Retries Respected ✅ 15444ms
Deduplication.Generates Unique Uuids ✅ 122ms
Deduplication.Preserves Uuid On Retry ✅ 5223ms
Deduplication.Preserves Uuid And Timestamp On Retry ✅ 10334ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry ✅ 5228ms
Deduplication.No Duplicate Events In Batch ✅ 121ms
Deduplication.Different Events Have Different Uuids ✅ 115ms
Compression.Sends Gzip When Enabled ✅ 115ms
Batch Format.Uses Proper Batch Structure ✅ 114ms
Batch Format.Flush With No Events Sends Nothing ✅ 109ms
Batch Format.Multiple Events Batched Together ✅ 125ms
Error Handling.Does Not Retry On 403 ✅ 2116ms
Error Handling.Does Not Retry On 413 ✅ 2116ms
Error Handling.Retries On 408 ✅ 5224ms

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

@turnipdabeets
turnipdabeets changed the base branch from feat/v6-desktop-capture-v1 to chore/v6-posthog-ios-4 November 2, 2026 20:54
@turnipdabeets
turnipdabeets force-pushed the chore/v6-remove-podspec branch from cda1257 to 92c5bcf Compare November 2, 2026 20:54

@marandaneto marandaneto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good; no qualifying findings. Verdict: correct.

@turnipdabeets
turnipdabeets merged commit 43b3567 into chore/v6-posthog-ios-4 Nov 3, 2026
26 of 40 checks passed
@turnipdabeets
turnipdabeets deleted the chore/v6-remove-podspec branch November 3, 2026 13:56
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