Skip to content

Ability to disable Swift Package Manager per plugin #146203

@vashworth

Description

@vashworth

Use case

Once Swift Package Manager support is added, we may want to consider adding ability to disable SPM per plugin.

An example use case of this is google_maps_flutter plugin (once converted to a Swift Package) will require iOS 14. However, the CocoaPods version of the plugin doesn't. So if I were a developer wanting to use the google_maps_flutter plugin and Swift Package Manager, I would have to increase my project's minimum deployment to iOS 14. However, if there was some way that I could tell Flutter to use the CocoaPods version of google_maps_flutter and still use other plugins with Swift Package Manager, then I would still be able to support lower iOS versions.

Another use case this might be helpful is when 2 plugins (one SPM and one CocoaPods) have a same dependency, it can cause a duplicate symbols/redefined module conflict because SPM and CocoaPods are unaware of each other. Instead of needing to disable SPM altogether, I could just disable for the specific plugins with a conflict.

Proposal

Add a way to disable Swift Package Manager for specific plugins per project (aka make them use the CocoaPods version). Perhaps via pubspec.yaml?

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: proposalA detailed proposal for a change to Flutterteam-iosOwned by iOS platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-iosTriaged by iOS platform team

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions