Xcode 10 个警告 "unexpected C compiler invocation with specified output"

Xcode 10 warning "unexpected C compiler invocation with specified output"

我有一个包含 Swift 和 Objective-C 代码的项目。

升级到 Xcode 10 和 Swift 4.2 后,我的两个 objective-C .m 文件收到以下警告:

:-1: unexpected C compiler invocation with specified output: '/Users/[username]/Library/Developer/Xcode/DerivedData/[filepath]' (for input: '/Users/[username]/Documents/Projects/[filepath]') (in target [targetName])

我该如何调试它?

找出问题所在: 我的一些源文件意外地列在构建阶段的 "Copy Bundle Resources" 下。 通过从 "Copy Bundle Resources" 中删除这些文件来修复。