Skip to content

fix: use repo-root-relative paths in Swift podspec#737

Merged
denischilik merged 2 commits into
mainfrom
fix/swift-podspec-paths
Apr 9, 2026
Merged

fix: use repo-root-relative paths in Swift podspec#737
denischilik merged 2 commits into
mainfrom
fix/swift-podspec-paths

Conversation

@thomson-t
Copy link
Copy Markdown
Contributor

@thomson-t thomson-t commented Apr 9, 2026

Summary

  • Fixes pod trunk push failure for mParticle-Apple-SDK-Swift by moving the podspec from mParticle-Apple-SDK-Swift/ subdirectory to the repo root (alongside the other two podspecs).
  • source_files changed from Sources/**/*.swift to mParticle-Apple-SDK-Swift/Sources/**/*.swift
  • license file changed from ../LICENSE to LICENSE
  • Updated all workflow, doc, and CI references to the new path.

Context

CocoaPods resolves paths in a podspec relative to the repo root (defined by s.source) during pod trunk push, but relative to the podspec file's directory during pod lib lint. With the podspec in a subdirectory, these two tools are fundamentally incompatible -- any path that works for one breaks the other.

Moving the podspec to the repo root eliminates this mismatch. Both pod lib lint and pod trunk push now resolve paths from the same location.

This was the first pod trunk push for this pod (CI step added in #723), so the bug was latent since the podspec was created.

Failed run: https://github.com/mParticle/mparticle-apple-sdk/actions/runs/24206575157/job/70669365797

Test plan

  • pod lib lint mParticle-Apple-SDK-Swift.podspec --allow-warnings passes locally
  • build-and-lint / pod-lint CI job passes
  • All kit Pod Lint jobs pass
  • Full CI green on PR

source_files and license file paths in a podspec are resolved relative
to the repo root (defined by s.source), not relative to the podspec
file location. The existing paths only worked for local pod references
and broke on `pod trunk push`.

- source_files: Sources/**/*.swift -> mParticle-Apple-SDK-Swift/Sources/**/*.swift
- license file: ../LICENSE -> LICENSE
@thomson-t thomson-t requested a review from a team as a code owner April 9, 2026 19:29
@cursor
Copy link
Copy Markdown

cursor Bot commented Apr 9, 2026

PR Summary

Medium Risk
Touches CocoaPods publishing and CI/release workflows; low code risk but could break pod lib lint/pod trunk push if paths are still incorrect or assumptions differ across runners.

Overview
Fixes mParticle-Apple-SDK-Swift.podspec to work when CocoaPods evaluates paths from the repo root (not the podspec’s directory) by updating s.source_files and the LICENSE path.

Updates CI/release workflows and docs to reference the Swift podspec at the repo root (removing the mParticle-Apple-SDK-Swift/mParticle-Apple-SDK-Swift.podspec path) for pod lib lint, version bumping, and pod trunk push.

Reviewed by Cursor Bugbot for commit 865a856. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 9, 2026

📦 SDK Size Impact Report

Measures how much the SDK adds to an app's size (with-SDK minus without-SDK).

Metric Target Branch This PR Change
App Bundle Impact 1.75 MB 1.75 MB -4 KB
Executable Impact 848 bytes 848 bytes +N/A
XCFramework Size 6.38 MB 6.38 MB -4 KB

➡️ SDK size impact change is minimal.

Raw measurements

Target branch (main):

{"baseline_app_size_kb":84,"baseline_executable_size_bytes":75464,"with_sdk_app_size_kb":1880,"with_sdk_executable_size_bytes":76312,"sdk_impact_kb":1796,"sdk_executable_impact_bytes":848,"xcframework_size_kb":6532}

This PR:

{"baseline_app_size_kb":84,"baseline_executable_size_bytes":75464,"with_sdk_app_size_kb":1876,"with_sdk_executable_size_bytes":76312,"sdk_impact_kb":1792,"sdk_executable_impact_bytes":848,"xcframework_size_kb":6528}

pod lib lint resolves paths relative to the podspec file's directory,
while pod trunk push resolves relative to the repo root. With the
podspec in a subdirectory, these two tools are incompatible. Moving
the podspec to the repo root makes both commands resolve paths the
same way.

Update all workflow, doc, and CI references accordingly.
@denischilik denischilik merged commit 3f22c4b into main Apr 9, 2026
69 of 71 checks passed
@denischilik denischilik deleted the fix/swift-podspec-paths branch April 9, 2026 19:52
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.

3 participants