XcodeGen icon indicating copy to clipboard operation
XcodeGen copied to clipboard

`Link binary with libraries`-build phase

Open knothed opened this issue 4 years ago • 3 comments

Using xcodegen with a project.yml which does not have any dependencies will create a project which is missing the "link binary with libraries" build phase.

When subsequently adding an SPM dependency manually in Xcode, building will fail (Undefined symbol) because the SPM dependency will not be added to a "link binary with libraries" phase since it is missing.

Is there a way to generate an empty "link binary with libraries" phase using xcodegen?

knothed avatar Oct 13 '21 10:10 knothed

Try adding link: true under the SPM package dependency for your target, like so:

target: myTarget
  dependencies: 
    - package: mySPM_Dependency
      link: true

armcknight avatar Jan 03 '22 22:01 armcknight

in case of a static xcframework the link: true is needed

ferologics avatar Sep 13 '22 12:09 ferologics