Skip to content

Add Swift Package Manager (SPM) support for iOS #189

@wytzepiet

Description

@wytzepiet

Swift Package Manager support needed

Flutter is migrating from CocoaPods to Swift Package Manager (SPM) for managing iOS and macOS native dependencies. Currently, flutter_js does not include a Package.swift manifest, which causes the following warning during builds:

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

Why this matters

  • CocoaPods is now in maintenance mode — SPM is Flutter's actively supported path forward for iOS native dependencies.
  • This warning will become a build error in a future Flutter version, breaking iOS builds for all flutter_js users.
  • SPM is bundled with Xcode, removing the need for a separate Ruby/CocoaPods installation.

What needs to be done

The Flutter team has published a migration guide for plugin authors:
👉 https://docs.flutter.dev/packages-and-plugins/swift-package-manager/for-plugin-authors#how-to-add-swift-package-manager-support-to-an-existing-flutter-plugin

In short, this involves adding a Package.swift to the ios/ directory of the plugin alongside the existing flutter_js.podspec, so both CocoaPods and SPM are supported during the transition period.

References

Thank you for maintaining this plugin — it's widely used and keeping it forward-compatible would be much appreciated! Happy to help test if needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions