我创建了一个 Swift 库,swift package init --type library
并使用swift package generate-xcodeproj
.
现在我正在尝试在 Xcode 中运行测试方案。它打印以下错误:
Module '<title>' was not compiled for testing
但是,当我在终端中运行时,它工作正常swift build
。swift test
我已经ENABLE_TESTABILITY
设定YES
了所有的目标。除了这个,我没有改变项目中的任何东西。如何让 Xcode 执行单元测试?