Search code examples
xcodeswiftcs193p

<unknown>:0: error: unexpected input file:


I downloaded files from a separate Stack OverFlow post, and dragged the folder into my project (as a group.) The dependancies get resolved and it shows no error for code that relies on the files, but when I try to compile I get this error:

<unknown>:0: error: unexpected input file: /.../xyz.Swift
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1

It might be nothing, but the files themselves in the project navigator show up as blank icons (while my project's other file have the swift red spalsh icon) despite checking in as swift files in the attribute inspector.

I've fumbled a few times with adding and deleting multiple sets of files, I checked the local dir and nothing seem out of order... is there something else that might be messing this up?

Thanks for suggestions!


Solution

  • Solved - The issue was with the filename extension:

    xyz .Swift will not properly link. It will be processed by xcode and solve code issues expecting it, but the linker will hiccup.

    renamed files to xyz .swift -> problem solved.