Skip to content

ci: keep the CocoaPods iOS build from blocking merges and releases - #155

Merged
thomson-t merged 2 commits into
mainfrom
ci/cocoapods-trunk-soft-fail
Oct 29, 2026
Merged

thomson-t merged 2 commits into
mainfrom
ci/cocoapods-trunk-soft-fail

Conversation

@thomson-t

@thomson-t thomson-t commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Why

Pull requests and releases of the Flutter plugin can soon be blocked for a reason unrelated to the change being made. CocoaPods, the older iOS package manager, is going read-only: its central repository plans to refuse uploads from 1 to 7 November 2026 as a test and permanently from 2 December 2026, dates the announcement says may move. The plugin's CocoaPods fallback takes its minimum iOS SDK version from the Swift Package Manager manifest, so once that minimum names a version that never reached CocoaPods, the CocoaPods build of the example app fails, and today that build blocks both merging and publishing to pub.dev. Once this lands, a CocoaPods dependency that cannot be resolved shows as a warning instead of failing the job. Compile errors in the CocoaPods build still fail it.

Programme

Standalone change, no programme.

What changes

  • Before: a failure anywhere in "Build iOS flutter app (CocoaPods)" failed that job. The job is a required check, and the pub.dev release depends on it.
  • After, when pod install fails: the old build step is now two steps. A new step, "Resolve CocoaPods dependencies", runs flutter build ios --config-only, which is where pod install happens. When it fails, a warning step reports it, the CocoaPods build is skipped, and the job stays green.
  • After, when pods resolve:
    • The xcodebuild of the example app runs as a separate step and still fails the job on a compile error.
    • The check that the iOS SDK is linked only once also runs as before.
    • This is the only build that compiles the plugin's iOS sources through CocoaPods. The Swift Package Manager job removes the podspec.
  • Unchanged:
    • "Switch example to CocoaPods" and the example's flutter test step still fail the job.
    • The Swift Package Manager job is unchanged and still required.
    • The CocoaPods iOS check can stay required. After this change it fails on test, setup and compile errors, but not on dependency resolution, and it is the only place the example's tests run.
  • Docs and changelog: the README is unchanged in this pull request. The changelog entry comes from this title.

Start reading at the "Resolve CocoaPods dependencies" step in build-ios.yml.

Linked work

None.

Rollout

  • Path: merging changes CI only. It is live from the merge for every pull request and for the next release run. No plugin code or published package changes.
  • Feature flags: none.
  • Turning it off: revert the pull request; the next run uses the old steps.
  • What we watch: the CocoaPods iOS job on the next pull requests and the next release.
    • It stays green with no warning while trunk has the SDK versions the plugin asks for.
    • A warning on that job means the resolve step failed, most likely because a CocoaPods dependency no longer resolves. The job log names the cause. Setup and compile errors still fail the job.

Risks

  • Any failure in the resolve step no longer blocks a merge or a release. That covers flutter pub get and flutter build ios --config-only, including its pod install, so a podspec that does not resolve also only produces a warning.
    • Not addressed: telling a version missing from CocoaPods apart from other resolve errors would mean matching CocoaPods' error output. The warning and step summary flag the failure.
    • How we would see it: a warning on the CocoaPods iOS job.
  • When resolution fails, the CocoaPods compile and duplicate-SDK checks are skipped.
    • Contained by: they need resolved pods, and the warning covers that case. Once pods resolve, both fail the job as before.
    • How we would see it: both steps show as skipped next to the warning.

Risk class: low.

Who

  • Written by: an automated coding agent, at a maintainer's request.
  • Code reviewed before opening: no one.
  • Design reviewed before opening: a maintainer agreed the approach before this was written.
  • Decision this implements: keep the CocoaPods fallback while it still resolves, and stop its build from blocking merges and releases. The record is not public.
  • Checked: actionlint on the workflow file, no issues.
  • Not checked: the warning path. It needs a CocoaPods failure, which this pull request does not cause. The checks on this pull request exercise the passing path.

Size

Hand-written: 18 lines added and 3 removed, in 1 file.
Generated: none.

CocoaPods trunk is going read-only. Its announced plan is a test run
that refuses every push from 1 to 7 November 2026, then a permanent
switch on 2 December 2026; the post says the dates may move:
https://blog.cocoapods.org/CocoaPods-Specs-Repo/

The plugin's podspec takes its mParticle-Apple-SDK floor from
Package.swift. Once that floor names a version that never reached
trunk, pod install in the CocoaPods iOS job fails. That job is a
required check and the pub.dev release needs it, so it would block
both merges and releases.

The CocoaPods setup and build steps now continue on error, and a
warning step names the failure. The example's flutter test step in
the same job stays a hard check, and the single-copy check still runs
whenever the CocoaPods build succeeds. The Swift Package Manager job
is unchanged and keeps gating the change.
@thomson-t
thomson-t marked this pull request as ready for review October 29, 2026 19:50

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Besides the inline finding, I checked the new step conditions. They correctly use outcome, not conclusion: with continue-on-error, outcome is still failure while conclusion becomes success. A skipped build step's outcome is skipped, so the linked-once check and the warning step each run only in the case they're meant for. The new comment, warning and summary text contain nothing internal or partner-identifying.

Extended reasoning...

I checked the step-condition semantics (outcome versus conclusion, and the skipped-step case) and the new text for internal or partner details, and found no further problems beyond the inline finding.

Comment thread .github/workflows/build-ios.yml Resolved
The previous commit let the whole CocoaPods build fail softly. For
Flutter 3.10 to 3.40 that build is the only one that compiles the
plugin's iOS sources, because the Swift Package Manager job needs
Flutter 3.41 or later and removes the podspec. A compile error there
must still fail the job.

Split resolution from the build. Only "Resolve CocoaPods dependencies"
(flutter build ios --config-only, which runs pod install) continues on
error. The xcodebuild step and the single-copy check run whenever pods
resolve and fail the job as before. "Switch example to CocoaPods" is
local setup and fails the job again.
@thomson-t
thomson-t merged commit cc41173 into main Oct 29, 2026
8 checks passed
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