Search code examples
iosxcodedependency-managementswift-package-managerxcodegen

XcodeGen how to specify SPM Package


I’m using XcodeGen for my project and curious how to add specific package from SPM?

Refer to screenshot, this is how I'm doing manually: enter image description here

This is my config for packages:

packages:
  Charts:
    url: https://github.com/danielgindi/Charts
    branch: master

Observing of documentation I don’t see anything about that. Is it even possible?


Solution

  • You can specify the product you need when you define the dependencies:

    dependencies:
        - package: Charts
          product: Charts
    

    Search for Package dependency in the documentation