I created the most simple custom class in a separate Swift file in my project:
class Foo
{
init()
{
println(\"I made a foo.\")
}
}
In Xcode 10's Project Navigator:
The source file now "lives" in the playground package; the Project refers to it (you can verify that with the File Inspector).
I tried it the other way around: file lives in project folder with reference in playground's Sources folder but it didn't work; I ended up with two copies of the source code file.