yonaskolb / XcodeGen

A Swift command line tool for generating your Xcode project
MIT License
7.01k stars 818 forks source link

Support for SPM artifact bundles #1383

Open mat1th opened 1 year ago

mat1th commented 1 year ago

Hello! Thank you for this project.

Sort description of feature request

I would like to use XcodeGen from a swift plugin. To be able to use in a swift plugin it is needed that that the published artifact is a artifact bundle. When XcodeGen is published as a artifact bundle you can reference XcodeGen the following way in your Package.swift file:

.binaryTarget(
   name: "XcodeGen",
   url: "https://github.com/yonaskolb/XcodeGen/releases/download/2.35.0/xcodegen.artifactbundle.zip",
   checksum: "<checksum>"
)

From there you are able to reference it from a swift package plugin and automate generating a Xcode project.

How to implement it

You can find in the following blog post how to support implement the artifact bundle.

Other swift tools already do support this. A couple of example pr's: