Skip to content

feat: add Swift Package Manager support for macOS#34

Open
goodspb wants to merge 1 commit into
leanflutter:mainfrom
goodspb:feat/spm-support
Open

feat: add Swift Package Manager support for macOS#34
goodspb wants to merge 1 commit into
leanflutter:mainfrom
goodspb:feat/spm-support

Conversation

@goodspb

@goodspb goodspb commented Jun 21, 2026

Copy link
Copy Markdown

Summary

  • Add macos/local_notifier/Package.swift with FlutterFramework dependency to support Swift Package Manager
  • Move Swift sources from macos/Classes/ to macos/local_notifier/Classes/ (shared between CocoaPods and SPM)
  • Update local_notifier.podspec source_files path to local_notifier/Classes/**/*
  • Add **/.build/ to .gitignore

Motivation

Flutter toolchain warns that local_notifier does not support Swift Package Manager:

The following plugins do not support Swift Package Manager for macos:
  - local_notifier
This will become an error in a future version of Flutter.

This PR resolves the warning by adding SPM support alongside the existing CocoaPods setup, following the same pattern used by tray_manager.

Test plan

  • Build a Flutter macOS app that depends on local_notifier with SPM enabled (flutter config --enable-swift-package-manager)
  • Verify no SPM warning is shown during build
  • Verify CocoaPods build still works (flutter config --no-enable-swift-package-manager)

- Add macos/local_notifier/Package.swift with FlutterFramework dependency
- Move Swift sources from macos/Classes/ to macos/local_notifier/Classes/
- Update podspec source_files path to match new structure
- Add **/.build/ to .gitignore
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.

1 participant