JohnSundell / SwiftPlate

Easily generate cross platform Swift framework projects from the command line
MIT License
1.77k stars 88 forks source link

Support single target/scheme cross platform template to clean up Xcode #28

Closed kdawgwilk closed 7 years ago

kdawgwilk commented 7 years ago

I would like to see the template adopt the single scheme/target mentioned in this blog post:

Multiplatform Single Scheme Xcode Projects

JohnSundell commented 7 years ago

@kdawgwilk sounds like a great idea! 👍 Maybe have it as an option as some developers prefer/require explicit schemes for each platform. Want to do the implementation?

kdawgwilk commented 7 years ago

I would love to add this support 😀 What is the best way to modify the template? Does SwiftPlate support passing a git url to a repo for different templates? Or would this there be 2 templates in this repo?

JohnSundell commented 7 years ago

@kdawgwilk Awesome! 👍 SwiftPlate supports giving a --repo (or -r) argument when run that points to an alternative repo that contains a template, but in this case we need to include both templates in the master repo. Maybe we can go the same approach as Xcode file/project templates and have folders that separate the differences in the templates?

kdawgwilk commented 7 years ago

How did you initially create the SwiftPlate templates? Was it just a find and replace with {PROJECT}?

JohnSundell commented 7 years ago

@kdawgwilk Yeah exactly, I opened all the project files in Atom, and did a find and replace.

kdawgwilk commented 7 years ago

I have actually been looking into creating Xcode templates instead so I am not interested as much with this solution. I will close this for now