XcodeGen icon indicating copy to clipboard operation
XcodeGen copied to clipboard

Target type `tool` does not list bundle dependency in Dependencies Build Phase

Open armcknight opened this issue 4 years ago • 1 comments

It does appear in the Copy Bundle Resources Build Phase, but not in the Dependencies Build Phase. This results in the bundle not appearing at runtime. If I manually add the bundle target to the tool target's Dependencies Build Phase in the Xcode GUI, the tool runs successfully and can find the bundle contents.

relevant spec portion:

targets:
  createYear:
    type: tool
    sources: [createYear]
    platform: macOS
    deploymentTarget: 10.15
    dependencies:
      - bundle: copyYearResources
  createYearResources:
    type: bundle
    sources: [createYearResources]
    platform: macOS
    deploymentTarget: 10.15

result: image

expected, which works for my tool at runtime: image

armcknight avatar Dec 05 '21 11:12 armcknight

Would this be a good place to look for implementation? Either in this function body, or at a caller of this function? https://github.com/yonaskolb/XcodeGen/blob/10fb43137b3d1f44e2d1d4fafa772a946bafb8c7/Sources/XcodeGenKit/PBXProjGenerator.swift#L708

armcknight avatar Dec 05 '21 11:12 armcknight