Xcode 9 beta 新构建系统失败并出现 "unable to build node" 错误

Xcode 9 beta new build system fails with "unable to build node" error

似乎 Xcode 9 beta 不喜欢 .xib 文件的文件名中的“~ipad”。选择新的构建系统时(对于使用旧构建系统成功编译的项目),它会出错:

unable to build node: '/Users/dev/Library/Developer/Xcode/DerivedData/proj-aiatvieseyfwjkfqncikqcohpdsn/Build/Products/Debug-iphoneos/proj.app/Controller~ipad.nib' (node is produced by multiple commands; e.g., 'adf8a93da84709e14beaf35ec6d6d21c02c34dc4669b6bd1e18a027ff75b53b5:CompileXIB /Users/dev/git/proj/Resources/Controllers/Controller.xib' and 'adf8a93da84709e14beaf35ec6d6d21c02c34dc4669b6bd1e18a027ff75b53b5:CompileXIB /Users/dev/git/proj/Resources/Controllers/Controller~ipad.xib')

我应该重命名它们还是有其他解决方案?

这是 Xcode 9 beta 中的一个已知错误。目前没有解决方法。

"XIB and Storyboard files which use platform-specific naming conventions (e.g. “MyView~ipad.xib”) may cause the new build system to emit an “unable to build node” error. (32409101)"

所以是的,您可以尝试删除“~ipad”并在 iPad 模拟器上执行它。

开启雷达:New Build System fails to build project containing universal xib