fluttercocoapodsswift-package-managerflutter-pluginflutter-platform-channel

How to add dependencies to Flutter plugin


I'm trying to implement new Flutter plugin to wrap my native SDKs and use my native SDK directly and return the result.

I already finished the Android part by adding my library using maven and use it inside my Android module, but now I'm stuck on iOS part as the plugin code is just a pod that will be used at the end so how I can add my dependence via Swift Package Manager to the plugin pod and use it instead of going and add vendor frameworks. Is there any way to do that?


Solution

  • Currently you likely need to switch to CocoaPods.

    Flutter does not support Swift Package Manager. See https://github.com/flutter/flutter/issues/33850