SPM migration#74
Conversation
There was a problem hiding this comment.
Pull request overview
Migrates the Flutter template’s iOS/macOS dependency management away from CocoaPods and toward Swift Package Manager (SPM), including updating the app’s in-app logging inspector from Alice to Talker to avoid native iOS dependencies that trigger CocoaPods.
Changes:
- Remove CocoaPods integration artifacts (Podfiles/locks, Pods references, xcconfig includes, Xcode project build phases) for iOS and macOS.
- Add/commit SPM resolution files and update Xcode project/scheme/workspace settings to support SPM-driven plugin integration.
- Replace
alice/alice_diowithtalker_flutter/talker_dio_loggerand update app logging wiring + documentation accordingly.
Reviewed changes
Copilot reviewed 23 out of 28 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/app/pubspec.yaml | Replaces Alice dependencies with Talker packages. |
| src/app/pubspec.lock | Updates lockfile to reflect removed Alice deps and added Talker deps. |
| src/app/macos/Runner.xcworkspace/contents.xcworkspacedata | Removes Pods project reference from the macOS workspace. |
| src/app/macos/Runner.xcodeproj/project.pbxproj | Strips CocoaPods framework refs/build phases/configs from macOS Xcode project. |
| src/app/macos/Podfile.lock | Removes macOS CocoaPods lockfile. |
| src/app/macos/Podfile | Removes macOS Podfile. |
| src/app/macos/Flutter/Flutter-Release.xcconfig | Removes Pods xcconfig include from macOS release config. |
| src/app/macos/Flutter/Flutter-Debug.xcconfig | Removes Pods xcconfig include from macOS debug config. |
| src/app/macos/.gitignore | Ignores Podfile/lock as generated artifacts to avoid re-tracking if Flutter regenerates them. |
| src/app/lib/presentation/diagnostic/logger_diagnostic_widget.dart | Switches “OPEN CONSOLE” action from Alice inspector to Talker screen navigation. |
| src/app/lib/main.dart | Registers Talker and Talker Dio interceptor instead of Alice/AliceDioAdapter. |
| src/app/lib/business/logger/logger_manager.dart | Wires TalkerOutput into logger outputs instead of AliceOutput. |
| src/app/lib/access/logger/talker_output.dart | Introduces a Logger LogOutput that forwards logs into Talker. |
| src/app/lib/access/logger/alice_output.dart | Attempts to migrate AliceOutput to Talker (but currently conflicts with the new file). |
| src/app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings | Updates shared workspace settings for iOS. |
| src/app/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved | Adds SPM resolution for iOS workspace packages. |
| src/app/ios/Runner.xcworkspace/contents.xcworkspacedata | Removes Pods project reference from the iOS workspace. |
| src/app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme | Adds a pre-build action to run Flutter framework preparation. |
| src/app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved | Adds SPM resolution for the Xcode project workspace. |
| src/app/ios/Runner.xcodeproj/project.pbxproj | Removes CocoaPods integration and adds FlutterGeneratedPluginSwiftPackage SPM linkage. |
| src/app/ios/Podfile.lock | Removes iOS CocoaPods lockfile. |
| src/app/ios/Podfile | Removes iOS Podfile (and its prior workarounds). |
| src/app/ios/Flutter/Release.xcconfig | Removes Pods xcconfig include from iOS release config. |
| src/app/ios/Flutter/Debug.xcconfig | Removes Pods xcconfig include from iOS debug config. |
| src/app/ios/.gitignore | Updates ignore rules to align with SPM and generated CocoaPods artifacts (if any). |
| src/app/android/gradle.properties | Adds Flutter-migrator Gradle flags related to Kotlin/new DSL behavior. |
| doc/Logging.md | Updates documentation from Alice to Talker (and Dio logger integration). |
| build/steps-build-ios.yml | Removes CocoaPods cache-clean/install steps from the iOS build pipeline. |
Files not reviewed (2)
- src/app/ios/Runner.xcworkspace/contents.xcworkspacedata: Generated file
- src/app/macos/Runner.xcworkspace/contents.xcworkspacedata: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9a7ea3a to
82ac66f
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 20 out of 25 changed files in this pull request and generated no new comments.
Files not reviewed (2)
- src/app/ios/Runner.xcworkspace/contents.xcworkspacedata: Generated file
- src/app/macos/Runner.xcworkspace/contents.xcworkspacedata: Generated file
Comments suppressed due to low confidence (1)
src/app/macos/Runner.xcodeproj/project.pbxproj:214
- macOS Runner.xcodeproj no longer references CocoaPods (Pods project/workspace ref + [CP] phases removed), but it also does not add the Flutter SPM integration (e.g., FlutterGeneratedPluginSwiftPackage / packageReferences / packageProductDependencies) that was added for iOS. With only the Flutter shell scripts left, macOS plugin dependencies (path_provider, shared_preferences, url_launcher, etc.) are likely no longer linked, and
flutter build macos/ Xcode builds may fail.
Add the Swift Package Manager integration for macOS as well (mirror the iOS FlutterGeneratedPluginSwiftPackage wiring):
- add an
XCLocalSwiftPackageReferencepointing toFlutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage - add an
XCSwiftPackageProductDependency - include that product in the Runner target’s Frameworks phase /
packageProductDependencies - include the package in the project’s
packageReferences
33CC10EC2044A3C60003C045 /* Runner */ = {
isa = PBXNativeTarget;
buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
33CC10E92044A3C60003C045 /* Sources */,
33CC10EA2044A3C60003C045 /* Frameworks */,
33CC10EB2044A3C60003C045 /* Resources */,
33CC110E2044A8840003C045 /* Bundle Framework */,
3399D490228B24CF009A79C7 /* ShellScript */,
);
buildRules = (
);
dependencies = (
33CC11202044C79F0003C045 /* PBXTargetDependency */,
);
name = Runner;
productName = Runner;
productReference = 33CC10ED2044A3C60003C045 /* ApplicationTemplate.app */;
productType = "com.apple.product-type.application";
};
| Prefix your items with `(Template)` if the change is about the template and not the resulting application. | ||
|
|
||
| ## 0.26.3 | ||
| - (Template) Migrate iOS from CocoaPods to Swift Package Manager. |
There was a problem hiding this comment.
You can remove the (Template) prefixes because all changes in this PR are affecting the application and not the templating engine.
GitHub Issue: #
Proposed Changes
Description
Migrates the Flutter template's iOS/macOS dependency management from CocoaPods to Swift Package Manager (SPM)
SPM Migration:
PodfileandPodfile.lockfrom bothios/andmacos/directoriesproject.pbxproj(iOS + macOS) of all CocoaPods build phases and referencespod deintegrateto remove CocoaPods check scripts from the Xcode projectWorkspaceSettings.xcsettingsand SPMPackage.resolvedAlice → Talker replacement:
alice+alice_diowithtalker_flutter+talker_dio_logger(pure Dart packages with no native iOS dependencies)alicewas the only remaining package pulling transitive dependencies (open_filex,permission_handler_apple) that did not support SPM, causing Flutter to fall back to CocoaPods at build timetalker_flutterprovides equivalent functionality: in-app log viewer, HTTP request inspector, and Dio interceptorResult: The iOS build completes with zero CocoaPods involvement — no Podfile, no Pods directory, no
pod install, all dependencies resolve via SPM.Console Talker in app debug mode
Impact on version
PR Checklist
Always applicable
No matter your changes, these checks always apply.
README.mdandsrc/cli/CLI.mdif you made changes to templating.AzurePipelines.mdandsrc/app/README.mdif you made changes to pipelines.Diagnostics.mdif you made changes to diagnostic tools.Architecture.mdand its diagrams if you made architecture decisions or if you introduced new recipes.doc/folder.Contextual
Based on your changes these checks may not apply.
Other information
Build validated: flutter build ios --no-codesign succeeds (25.7MB)
All Firebase packages (core, analytics, remote_config) resolve via SPM
The talker_flutter "OPEN CONSOLE" button in the diagnostics overlay replaces Alice's inspector with equivalent log/HTTP viewing capability
Internal Issue (If applicable):
PRODUCT BACKLOG ITEM 333831