I'm learning Swift and I want to import a protocol from one file into another. I've looked at this thread How do I import a Swift file from another Swift file?, but all the answers are focused on setting a target
and other XCode related features.
I'm running swift files on the command line: swift myfile.swift
, which is pretty clearly a different execution environment than Xcode. Any guidance on importing a neighboring structure?
myDir
├── CoolProtocol.swift
├── my file.swift