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

柔情痞子 提交于 2019-12-04 03:06:35

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.

In my case it was after removing a compiler flag in a way it didn't like. Try to figure out what you changed in your compiler settings before it started acting weird. Sometimes because Xcode caches compiled code the problem doesn't immediately start after doing the change!

BaseZen

I haven't seen that precise error before, but don't add files through Finder. Start over, and this time use 'New' -> 'File...' from the Xcode 'File' menu. It has to update its internal manifests to track all project files; you don't want to subvert this process.

After that you may still need to do a 'Clean' before re-building, and perhaps remove all of the DerivedData as well while Xcode is not running:

How can I safely delete in my ~/Library/Developer/Xcode/DerivedData directory?

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!