feat(cli): capture ios_package_manager in telemetry#8482
Merged
Conversation
Extend the CLI telemetry payload with `ios_package_manager` (Cocoapods | bundler | SPM | unknown), resolved from `config.ios.packageManager` and guarded so non-iOS projects or detection failures yield `unknown` without breaking `telemetryAction`. The existing `app_id` continues to be sent unchanged as the dedup key, and the telemetry opt-out path is preserved.
andredestro
approved these changes
May 27, 2026
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.
Description
Adds
ios_package_managerto the Capacitor CLI's telemetry payload so every command emitted from a project with an iOS platform reports the dependency manager in use (Cocoapods | bundler | SPM | unknown). Detection reuses the existing memoizedconfig.ios.packageManagerpromise and is guarded so non-iOS projects or detection failures yield'unknown'and never throw out oftelemetryAction. The existingapp_idcontinues to be sent unchanged and remains the dedup key — no new identifier, no paths, no bundle IDs.Change Type
Rationale / Problems Fixed
Need real-world data to prioritize SPM tooling work and plan CocoaPods deprecation; the CLI is the only signal source. Because
cap syncruns many times per day, raw event counts would overstate adoption — emitting the new field alongside the existingapp_idlets downstream consumers dedup per project. Dashboard and metrics-backend work to consume this signal is intentionally out of scope and will be tracked in a separate follow-up.Tests or Reproductions
Unit tests in
cli/test/telemetry.spec.tscover the three behavioral branches ofgetIOSPackageManager:'unknown'packageManagerresolves → returns the valuepackageManagerrejects →'unknown'Manually verified against four fixture apps with
DEBUG=capacitor:telemetry npx cap sync <platform>:Also, and more importantly, checked that the new
ios_package_managerfield is getting to our endpoint and then being sent to Snowflake.ios_package_managerCapApp-SPM/(default iOS template)'SPM'Podfile, noGemfile'Cocoapods'Podfile+Gemfilewithgem 'cocoapods'+bundleon PATH'bundler''unknown'Each fixture emits a distinct
app_id, confirming the dedup key still works per project. AC coverage forsync,update,copy,build,run,openis automatic: the new field is added insidetelemetryActionitself, so every wrapped command picks it up.Screenshots / Media
n/a
Platforms Affected
Notes / Comments
Includes a
debug('metric payload: %O', data)line intelemetry.tsto make local inspection cheap (silent unlessDEBUG=capacitor:telemetryis set). Happy to drop it before merge if reviewers prefer to keep the diff strictly scoped to the AC.