Skip to content

SPM migration#74

Open
noemiehelias wants to merge 8 commits into
mainfrom
chore/spm-migration
Open

SPM migration#74
noemiehelias wants to merge 8 commits into
mainfrom
chore/spm-migration

Conversation

@noemiehelias

@noemiehelias noemiehelias commented Jun 29, 2026

Copy link
Copy Markdown

GitHub Issue: #

Proposed Changes

  • Bug fix
  • Feature
  • Code style update (formatting)
  • Refactoring (no functional changes, no api changes)
  • Build or CI related changes
  • Documentation content changes
  • Other, please describe:

Description

Migrates the Flutter template's iOS/macOS dependency management from CocoaPods to Swift Package Manager (SPM)

SPM Migration:

  • Removed Podfile and Podfile.lock from both ios/ and macos/ directories
  • Cleaned project.pbxproj (iOS + macOS) of all CocoaPods build phases and references
  • Ran pod deintegrate to remove CocoaPods check scripts from the Xcode project
  • Cleaned workspace data files to remove Pods project references
  • Removed CocoaPods CI steps from steps-build-ios.yml (cache clean + pod install)
  • Cleaned xcconfig files (removed Pods includes)
  • Added WorkspaceSettings.xcsettings and SPM Package.resolved
  • Updated .gitignore (iOS + macOS)

Alice → Talker replacement:

  • Replaced alice + alice_dio with talker_flutter + talker_dio_logger (pure Dart packages with no native iOS dependencies)
  • alice was 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 time
  • talker_flutter provides equivalent functionality: in-app log viewer, HTTP request inspector, and Dio interceptor

Result: 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

  • Major
    • The template structure was changed.
  • Minor
    • New functionalities were added.
  • Patch
    • A bug in behavior was fixed.
    • Documentation was changed.

PR Checklist

Always applicable

No matter your changes, these checks always apply.

  • Your conventional commits are aligned with the Impact on version section.
  • Updated CHANGELOG.md.
    • Use the latest Major.Minor.X header if you do a Patch change.
    • Create a new Major.Minor.X header if you do a Minor or Major change.
    • If you create a new header, it aligns with the Impact on version section and matches what is generated in the build pipeline.
  • Documentation files were updated according with the changes.
    • Update README.md and src/cli/CLI.md if you made changes to templating.
    • Update AzurePipelines.md and src/app/README.md if you made changes to pipelines.
    • Update Diagnostics.md if you made changes to diagnostic tools.
    • Update Architecture.md and its diagrams if you made architecture decisions or if you introduced new recipes.
    • ...and so forth: Make sure you update the documentation files associated to the recipes you changed. Review the topics by looking at the content of the doc/ folder.
  • Images about the template are referenced from the wiki and added as images in this git.
  • TODO comments are hints for next steps for users of the template and not planned work.

Contextual

Based on your changes these checks may not apply.

  • Automated tests for the changes have been added/updated.
  • Tested on all relevant platforms

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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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_dio with talker_flutter/talker_dio_logger and 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.

Comment thread src/app/lib/access/logger/talker_output.dart
Comment thread src/app/lib/access/logger/alice_output.dart Outdated
Comment thread src/app/lib/access/logger/alice_output.dart Outdated
Copilot stopped work on behalf of noemiehelias due to an error June 30, 2026 20:17
@noemiehelias noemiehelias force-pushed the chore/spm-migration branch from 9a7ea3a to 82ac66f Compare June 30, 2026 20:18
@noemiehelias noemiehelias requested a review from a team July 2, 2026 13:39
@arianeleonard arianeleonard requested a review from Copilot July 3, 2026 13:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 XCLocalSwiftPackageReference pointing to Flutter/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";
		};

Comment thread src/cli/CHANGELOG.md Outdated
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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You can remove the (Template) prefixes because all changes in this PR are affecting the application and not the templating engine.

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