Skip to content

chore(samples): disable Swift Package Manager for sample_app#2672

Merged
xsahil03x merged 6 commits into
masterfrom
fix/disable-spm-sample-app
May 20, 2026
Merged

chore(samples): disable Swift Package Manager for sample_app#2672
xsahil03x merged 6 commits into
masterfrom
fix/disable-spm-sample-app

Conversation

@xsahil03x
Copy link
Copy Markdown
Member

@xsahil03x xsahil03x commented May 20, 2026

Summary

  • Disable Swift Package Manager for sample_app via the new pubspec flutter > config > enable-swift-package-manager: false flag.
  • Flutter 3.44 enables SPM auto-integration by default. During release builds in distribute_internal, the SPM-resolved plugin packages (Firebase, GoogleUtilities, photo_manager, etc.) attempt to use the app's signing/development team and fail with Signing for "X" requires a development team. Select a development team in the Signing & Capabilities editor. errors.
  • Disabling SPM for the sample_app forces the pre-existing CocoaPods path, restoring the working signing setup.

Test plan

  • distribute_internal workflow runs successfully on this branch (triggered manually after PR creation).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Disabled Swift Package Manager integration in the sample app's Flutter iOS configuration to standardize builds.
    • iOS release process now uploads native debug symbols to Crashlytics automatically before distributing builds, improving post-release crash symbolication and diagnostics.

Review Change Stack

Disable SPM for sample_app to fix the distribute_internal workflow,
which started failing after Flutter 3.44 enabled SPM auto-integration.
The SPM-resolved plugin packages were attempting to be signed with the
app's development team during release builds, breaking distribution.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 20, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: eab5f2a3-c55a-43d1-85ad-b366cfb2f2cc

📥 Commits

Reviewing files that changed from the base of the PR and between 4469ed1 and b577825.

📒 Files selected for processing (1)
  • sample_app/ios/fastlane/Fastfile

📝 Walkthrough

Walkthrough

Adds a Flutter flutter.config entry to disable Swift Package Manager in the sample app and updates iOS Fastlane lanes to upload dSYMs to Firebase Crashlytics (via a new private lane) before distributing builds to Firebase App Distribution or TestFlight.

Changes

iOS distribution and build config

Layer / File(s) Summary
Disable Swift Package Manager
sample_app/pubspec.yaml
Adds a config block under flutter: setting enable-swift-package-manager: false.
Fastlane dSYM upload implementation
sample_app/ios/fastlane/Fastfile
Adds private_lane :upload_dsyms_to_crashlytics which zips build/ios/archive/Runner.xcarchive/dSYMs and calls upload_symbols_to_crashlytics with GoogleService-Info.plist and the Crashlytics upload-symbols binary.
Invoke dSYM upload from distribution lanes
sample_app/ios/fastlane/Fastfile
Calls upload_dsyms_to_crashlytics from distribute_to_firebase and distribute_to_testflight after build_ipa(...) and before firebase_app_distribution(...) / upload_to_testflight(...).

Sequence Diagram(s)

sequenceDiagram
  participant Fastfile
  participant UploadLane as upload_dsyms_to_crashlytics
  participant UploadTool as upload_symbols_to_crashlytics
  participant Crashlytics
  participant Distributor as Firebase_App_Distribution/TestFlight

  Fastfile->>UploadLane: call upload_dsyms_to_crashlytics
  UploadLane->>UploadTool: invoke upload_symbols_to_crashlytics with dSYMs + GoogleService-Info.plist + upload-symbols binary
  UploadTool->>Crashlytics: upload dSYM symbols
  Fastfile->>Distributor: continue to firebase_app_distribution / upload_to_testflight
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • VelikovPetar

Poem

🐰 I hop with dSYMs held tight,
Fastlane hums into the night,
Swift Pack off, symbols sent with care,
Crashlytics listens, logs prepare,
Builds take flight on breezy air.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title 'chore(samples): disable Swift Package Manager for sample_app' accurately reflects the main change: adding a pubspec flag to disable SPM. However, the PR also includes changes to zip dSYMs before upload to Crashlytics, which is a separate substantive change not mentioned in the title. Update the title to mention both changes, or split into multiple PRs. Example: 'chore(samples): disable SPM and zip dSYMs for Crashlytics upload in sample_app' or create separate PRs for each concern.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/disable-spm-sample-app

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@sample_app/pubspec.yaml`:
- Around line 53-54: The pubspec.yaml currently uses the wrong flag under
config: "enable-swift-package-manager: false"; update the project to use the
documented per-project SPM toggle by moving this setting under the flutter:
section (or replacing the config key) and use "disable-swift-package-manager:
true" instead of "enable-swift-package-manager: false" so the Flutter build
system recognizes it; target the pubspec.yaml keys "config",
"enable-swift-package-manager", and "disable-swift-package-manager" when making
the change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f4b03254-4eb7-4fac-b45c-bdc45af11b1e

📥 Commits

Reviewing files that changed from the base of the PR and between 903c77c and d8e1411.

📒 Files selected for processing (1)
  • sample_app/pubspec.yaml

Comment thread sample_app/pubspec.yaml
@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.27%. Comparing base (c7a7abe) to head (b577825).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2672   +/-   ##
=======================================
  Coverage   65.27%   65.27%           
=======================================
  Files         423      423           
  Lines       26622    26622           
=======================================
  Hits        17377    17377           
  Misses       9245     9245           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

xsahil03x and others added 2 commits May 20, 2026 13:04
Add `upload_symbols_to_crashlytics` after `build_ipa` in both
distribute_to_firebase and distribute_to_testflight lanes so iOS crashes
captured by Firebase Crashlytics (introduced in #2665) can be
symbolicated. Reads dSYMs from build/ios/archive/Runner.xcarchive/dSYMs,
the canonical xcarchive output path used by `flutter build ipa`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@sample_app/ios/fastlane/Fastfile`:
- Around line 127-132: The upload_dsyms_to_crashlytics lane currently hardcodes
"#{root_path}/build/ios/archive/Runner.xcarchive"; change it to discover the
most recent ".xcarchive" in "#{root_path}/build/ios/archive" at runtime and use
that path for dsym_path when calling upload_symbols_to_crashlytics; if no
.xcarchive is found, raise a clear fastlane UI.user_error! (or process exit)
with a descriptive message including the archive directory and that no
.xcarchive was found so the lane fails loudly. Ensure references to
upload_dsyms_to_crashlytics, upload_symbols_to_crashlytics, and root_path are
updated to use the computed archive variable.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: bdb15770-c536-4ac2-a423-f59eb8e36bde

📥 Commits

Reviewing files that changed from the base of the PR and between d8e1411 and d61b0b8.

📒 Files selected for processing (1)
  • sample_app/ios/fastlane/Fastfile

Comment thread sample_app/ios/fastlane/Fastfile
xsahil03x and others added 2 commits May 20, 2026 13:11
The `upload_symbols_to_crashlytics` action's `dsym_path` validator only
accepts a single `.dSYM` bundle or `.zip`, not a parent directory. A
Flutter xcarchive's `dSYMs/` folder holds multiple `.dSYM`s
(Runner.app, App.framework, Flutter.framework, plugin frameworks), so
glob each one and pass via `dsym_paths`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@sample_app/ios/fastlane/Fastfile`:
- Line 126: The dsym_paths assignment using
Dir["#{root_path}/build/ios/archive/Runner.xcarchive/dSYMs/*.dSYM"] may be empty
and cause upload_symbols_to_crashlytics to silently skip uploading; add a guard
after computing dsym_paths (or before calling upload_symbols_to_crashlytics)
that checks dsym_paths.empty? and calls UI.user_error! with a clear message if
true so the lane fails fast instead of continuing silently.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7248a351-68b4-4fc7-ad64-51a2f130f863

📥 Commits

Reviewing files that changed from the base of the PR and between 287ab36 and 4469ed1.

📒 Files selected for processing (1)
  • sample_app/ios/fastlane/Fastfile

Comment thread sample_app/ios/fastlane/Fastfile Outdated
Match the canonical Flutter+fastlane pattern: zip the xcarchive's
dSYMs folder via fastlane's built-in `zip` action and pass the
resulting zip to `upload_symbols_to_crashlytics`. Replaces the prior
`dsym_paths` glob, which required passing each `.dSYM` bundle
individually and triggered N separate upload-symbols invocations.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@xsahil03x xsahil03x merged commit abc8648 into master May 20, 2026
25 checks passed
@xsahil03x xsahil03x deleted the fix/disable-spm-sample-app branch May 20, 2026 12:25
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