chore(samples): disable Swift Package Manager for sample_app#2672
Conversation
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>
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds a Flutter ChangesiOS distribution and build config
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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
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>
There was a problem hiding this comment.
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
📒 Files selected for processing (1)
sample_app/ios/fastlane/Fastfile
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>
There was a problem hiding this comment.
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
📒 Files selected for processing (1)
sample_app/ios/fastlane/Fastfile
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>
Summary
sample_appvia the new pubspecflutter > config > enable-swift-package-manager: falseflag.distribute_internal, the SPM-resolved plugin packages (Firebase, GoogleUtilities, photo_manager, etc.) attempt to use the app's signing/development team and fail withSigning for "X" requires a development team. Select a development team in the Signing & Capabilities editor.errors.Test plan
distribute_internalworkflow runs successfully on this branch (triggered manually after PR creation).🤖 Generated with Claude Code
Summary by CodeRabbit