Skip to content

Add Swift Package Manager (SPM) support - #206

Open
danyabdo94 wants to merge 1 commit into
justsoft:masterfrom
danyabdo94:feature/add-spm-support
Open

Add Swift Package Manager (SPM) support#206
danyabdo94 wants to merge 1 commit into
justsoft:masterfrom
danyabdo94:feature/add-spm-support

Conversation

@danyabdo94

Copy link
Copy Markdown

Summary

  • Add Package.swift and SPM-compatible source layout in ios/video_thumbnail/
  • Existing CocoaPods structure in ios/Classes/ is preserved for backward compatibility
  • Uses libwebp-Xcode SPM package for WebP encoding support

Context

Flutter now supports Swift Package Manager as a native dependency resolution mechanism. Plugins that provide a Package.swift in their ios/<plugin_name>/ directory are automatically resolved via SPM, eliminating the need for CocoaPods fallback.

Without SPM support, Flutter falls back to CocoaPods for the entire project when even a single plugin lacks a Package.swift.

Test plan

  • flutter build ios succeeds with SPM enabled (flutter config --enable-swift-package-manager)
  • Zero CocoaPods fallback warnings in build output
  • flutter build ios --release produces a valid IPA

🤖 Generated with Claude Code

Adds Package.swift and SPM-compatible source layout alongside existing
CocoaPods structure. This enables the plugin to be resolved via Flutter's
native SPM support (flutter config --enable-swift-package-manager).

The libwebp dependency is provided via the libwebp-Xcode SPM package.
@gabdsg

gabdsg commented Jun 4, 2026

Copy link
Copy Markdown

+1

@AbnerBaluyut

Copy link
Copy Markdown

+1

Thanks for the effort on this PR. If this doesn't get merged, it might be simpler to fork the repo and maintain a patched version internally, since this package is already widely used and breaking changes are costly.

Appreciate your work either way.

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