XcodeGen icon indicating copy to clipboard operation
XcodeGen copied to clipboard

Can this project be used for a Command Line Tool project?

Open dcarmo-contracts opened this issue 3 years ago • 2 comments

Hello,

Can this project be used for a macOS command line tool and if so is there documentation on what platform type that would be?

Thank you in advance

dcarmo-contracts avatar Feb 07 '22 16:02 dcarmo-contracts

By "used for a Command Line Tool project", did you mean (1) to use XcodeGen to generate Xcode project and targets for a Command Line Tool (application), or (2) to interact with XcodeGen as if this was a Swift library that you can import XcodeGen?

For 1, it is definitely do-able. Command Line Tool targets are just like other macOS/iOS application targets.

For 2, you can reference this repo from SPM and import XcodeGenKit, which is the underlying library/SDK that drives xcodegen command.

VaslD avatar Feb 16 '22 13:02 VaslD

For

By "used for a Command Line Tool project", did you mean (1) to use XcodeGen to generate Xcode project and targets for a Command Line Tool (application), or (2) to interact with XcodeGen as if this was a Swift library that you can import XcodeGen?

For 1, it is definitely do-able. Command Line Tool targets are just like other macOS/iOS application targets.

For 2, you can reference this repo from SPM and import XcodeGenKit, which is the underlying library/SDK that drives xcodegen command.

Adding for 2: it seems that copying some code is necessary though. https://gitanswer.com/using-xcodegen-directly-from-swift-swift-xcodegen-780496368

hakkurishian avatar Mar 17 '22 22:03 hakkurishian