yonaskolb / XcodeGen

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

Generating Playgrounds? #49

Open kdawgwilk opened 7 years ago

kdawgwilk commented 7 years ago

I am working on a a Swift project and I need to be able to generate a Playground inserting my own file into it to get some autocomplete

yonaskolb commented 7 years ago

Interesting, I guess a feature like that could take a few forms.

yonaskolb commented 7 years ago

What sort of use case would you specifically be trying to solve? I assume you're aware that a playground in a project can make use of all the frameworks already? Would just being able to add non resources or source files into the project be enough, so you could link an existing playground?

kdawgwilk commented 7 years ago

My specific use case is centered around this project Autobahn and wanting to build an autobahn edit that generates a Swift playground or similar in a tmp directory that gives autocomplete for the Autobahn.swift similar to how SPM does with its Package.swift

yonaskolb commented 7 years ago

Cool looking project! Looking forward to using it 😄

I guess there would be 2 options then. Generating a playground file with Autobbahn.swift in it's sources, or generating a workspace with an Autobahn framework. Both of those could be a possible features for XcodeGen, but I think you should take a look at 2 relevant projects from John Sundell first. https://github.com/JohnSundell/Xgen and also https://github.com/JohnSundell/TestDrive which uses Xgen in a similar way to how you would