Sharing common code between projects

Asked this in the Swift forum, but it's probably a beginner topic.


I am building up a collection of Swift classes and extensions that are clearly useful in more than one project.


A frequent suggestion is to turn common code into a framework. But I am finding that is overkill for many simple cases.


I don't need the linker to connect pre-compiled code. I am quite happy to simply include the shared source in my project.


XCode will certainly allow me to drag-in single source files from an external directory. That works fine.


But is there a tidier solution?


Is there a case for allowing a sub-project (without a target) to be dragged into workspace - and just be a package of source files?

Replies

My suggestion is to take those class files and put them in a seperate folder on your computer so that when you want to use one of the classes you can just "Add file" to your project. You can't take an old project and drop it into a new one becuase on a general scale that has no functionallity.

That's what I have resigned myself to do.


But I do think some way of packaging a common-files-souce-inclusion-bundle, might be valuable.

Then again, perhaps XCode has enough features.