How to use classes defined in other files in Swift script
I have a Swift script "main.swift" which I created by adding
#!/usr/bin/env xcrun swift
to the beginning. Moreover, I chmod + x'd to make it executable.
Inside the script, I would like to use the Swift class "A" defined in another file "A.swift" contained in the same parent folder "main.swift".
Just using "A" inside "main.swift" doesn't work.
Any ideas on how to achieve this?
+3
source to share