Skip to content

Handling package interdependencies for iOS needs to be updated to SwiftPM #13801

Description

@vashworth

Page URL

https://docs.flutter.dev/packages-and-plugins/developing-packages#ios

Page source

No response

Describe the problem

The documentation is currently for CocoaPods. SwiftPM is now the default.

Expected fix

The SwiftPM instructions should say something like

The following example sets a dependency for other_plugin in my_plugin/ios/my_plugin/Package.swift:

let package = Package(
  ...
  dependencies: [
    .package(name: "other_plugin", path: "../other_plugin"),
    ...

You can now import other_plugin and access the source code at my_plugin/ios/my_plugin/Sources.

For additional details on Swift package manifests, see the Apple's Documentation.

Additional context

No response

I would like to fix this problem.

  • I will try and fix this problem on docs.flutter.dev.

Metadata

Metadata

Assignees

No one assigned

    Labels

    from.page-issueReported in a reader-filed concern

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions