Closed pkasson closed 4 months ago
Hey @pkasson!
When you say "dynamically, without building in Xcode", do you mean you'd like to:
swift build
^1; orWhen you say "start the server programmatically", you can use swift run
on the command line with any of our server examples, or otherwise start the server by running the binary directly.
Finally, the title of your issue is "programmatic init". If this is about a command to bootstrap a package from scratch, without an Xcode project, then you may be interested in #448.
Does this answer your questions? If not, could you provide more details as to what you're trying to achieve and how?
Happy holidays :)
@simonjbeaumont - thanks for the great response !
Happy holidays ;)
Ok. Probably start looking at one of the examples in the Examples/ directory of this repo. There are two using manual generation workflows. One uses Swift package command plugin, the other uses a makefile. They are the ones prefixed with manual-generation- and each has a covering readme.
They should help you get started.
But if you just want to be out of Xcode, neither of these is necessary as the code is built for you by SwiftPM just by depending on the plugin. For this, see any of the hello-world- examples. These also have covering readmes and can be built with swift build
and the code is generated at build time automatically.
Hi @pkasson, hopefully the info Si provided can get you started. If you have follow-up questions, please reply here and we can reopen the issue if needed.
Question
Is it possible to generate client code without building within Xcode (i.e. dynamically) ... and how to start server programmatically ?