Skip to content

Build the package with swiftpods instead of the Makefile pipeline - #128

Merged
d-date merged 4 commits into
mainfrom
swiftpods
Nov 18, 2026
Merged

d-date merged 4 commits into
mainfrom
swiftpods

Conversation

@d-date

@d-date d-date commented Nov 18, 2026

Copy link
Copy Markdown
Owner

Why

The Makefile + ~20 Ruby scripts encoded every ML Kit fix by hand (framework lists, Info.plist templates, product closures, dependency bounds). swiftpods now does the same generically from Podfile.swift: it builds the pods, assembles the xcframeworks (Info.plist, arm64 simulator slice, object → ar, source pods as library xcframeworks), derives products from the pod graph, verifies that every product links on its own, and writes the whole Package.swift.

What changes for consumers (release 9.0.4)

  • Minimum iOS is 15.5, as ML Kit 9's pods require (was 15.0).
  • Common links only the package products ML Kit's pods use (GULEnvironment, GULLogger, GULUserDefaults, GTMSessionFetcherCore, FBLPromises, nanopb, GoogleDataTransport) plus the system frameworks/libraries the podspecs declare, instead of a hand-picked list.
  • MLKitLanguageID, MLKitTranslate, MLKitSmartReply no longer link MLKitXenoCommon (not in their ML Kit 9.0 dependency graph; link-verified).
  • Dependency ranges are narrowed to versions whose commits match the pods; gtm-session-fetcher and nanopb keep the wider ranges Firebase 13 needs as unsafe overrides, flagged with #warning in Package.swift.
  • New resource bundles: GoogleToolboxForMac_Privacy, GoogleToolboxForMac_Logger_Privacy, SSZipArchive (privacy manifests).

Verification (local)

  • swiftpods package --version 9.0.4: 33 xcframeworks, 22 bundle zips; all 19 products link on their own (simulator + device).
  • Example CameraTests on the iOS Simulator against the new artifacts (local binary targets): all 5 pass, including text recognition with the OCR model, barcode, language ID, entity extraction, digital ink. Note: text recognition needs LatinOCRResources.bundle in the test bundle — the 9.0.3 artifacts fail the same way without it (see TESTING.md).
  • Example app builds and launches on the simulator; resolves together with Firebase 13.2.0 (nanopb 2.30910.1).
  • Not yet: physical device run; the new CI workflow has not run (needs d-date/swiftpods to be public).

Release

After merge: tag 9.0.4 on main, push it, then scripts/release.sh --skip-package 9.0.4 uploads the artifacts built for this PR.

🤖 Generated with Claude Code

d-date and others added 4 commits November 18, 2026 15:56
The Ruby Podfile only fed a CocoaPods + Makefile pipeline whose output
(Package.swift URLs, checksums, products and dependency ranges) was patched
together by several scripts. swiftpods derives all of it from one manifest,
so Podfile.swift replaces the Podfile and Package.swift is now generated by
`swiftpods package --version 9.0.4`.

The generated manifest raises the minimum to iOS 15.5 (what the ML Kit 9
pods declare), narrows the Google dependencies to the versions the pods
accept, and keeps the two hand-checked overrides (gtm-session-fetcher for
Firebase 13, nanopb's 2.30910 fork tags) as unsafe overrides that print a
#warning to consumers.

check_mlkit_version.rb reads the current ML Kit requirement from
Podfile.swift now, so the daily update check keeps working.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`swiftpods package` now does what the Makefile, xcframework-maker and the
Ruby post-processing did: build the pods, add Info.plists, synthesise the
arm64 simulator slice, turn object files into ar archives, zip the
xcframeworks and bundles, compute checksums, write Package.swift and link
every product on its own. Keeping the old scripts around would only leave
two ways to build a release that disagree.

Removed: Makefile, build_with_asdf.sh, the xcframework-maker submodule,
Resources/*-Info.plist, the Mach-O patcher and its test, the
postprocess/checksum/dependency/version/README/release-note scripts, the
product closure and build checks, the old build/release shell scripts,
pod_update.log, pod_changes_summary.txt, and Gemfile/Gemfile.lock (no
script needs a gem any more; check_mlkit_version.rb uses only the
standard library).

Kept, because swiftpods does not do their job: check_mlkit_version.rb
(daily update check), download_bundles.sh (fetches released bundles for
the Example app), use_local_binaries.rb, verify_local_archive.sh and
verify_app_store_upload.sh (run ML Kit on the Simulator, archive and
validate with Apple). The last three now read build/distribution and
unpack the bundle zips swiftpods writes.

CI no longer runs the removed Ruby checks, and now syntax-checks every
script: `ruby -c` and `bash -n` given several files only check the
first. check-mlkit-updates no longer asks setup-ruby for a bundle that
does not exist.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The release workflow ran the Makefile and three Ruby scripts and uploaded
GoogleMLKit/*.zip by glob. It now builds swiftpods from d-date/swiftpods
(SWIFTPODS_REF, main until a tag is published), runs `swiftpods package`,
commits the regenerated Podfile.swift/Podfile.lock/Package.swift, tags,
pushes and hands the upload to scripts/release.sh.

release.sh is the one upload path for CI and for a local release. It
refuses to publish when an xcframework zip that Package.swift references
is missing, points at another release or fails its checksum, or when the
tag on origin carries a different Package.swift: any of those would give
consumers a manifest that cannot resolve. Every resource bundle zip in
build/distribution is uploaded too, since consumers add them by hand.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The docs still walked through the Makefile, xcframework-maker, the
Info.plist templates and a dozen scripts that no longer exist, which
would send maintainers (and agents following the mlkit-release skill)
to commands that fail.

They now describe the build as `swiftpods package` from Podfile.swift,
publishing through scripts/release.sh or the build workflow, the
versioning rule (major.minor follow ML Kit, patch counts wrapper
releases), the iOS 15.5 minimum taken from the ML Kit 9 pods, and the
two unsafe dependency overrides with the #warning they put at the top of
Package.swift.

TESTING.md records that CameraTests only recognise text when
LatinOCRResources.bundle is inside the test bundle: verified on
2026-11-18, both the 9.0.3 artifacts and the swiftpods-built ones fail
with "Invalid model path." without it, and the swiftpods-built ones pass
all 5 tests with it copied into CameraTests.xctest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@d-date
d-date merged commit 6377802 into main Nov 18, 2026
1 check passed
@d-date
d-date deleted the swiftpods branch November 18, 2026 07:05
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