Ios 添加新测试目标时,Project停止生成

Ios 添加新测试目标时,Project停止生成,ios,xcode,Ios,Xcode,我想为我的应用程序创建一个测试目标 在添加测试目标之前,应用程序构建并运行良好 当我添加测试目标时,这是我尝试构建时显示的内容 生成的symfile/Users/dev1/Library/Developer/Xcode/DerivedData/MyApp-apigviljomlmendsdvrgelzkevw/Build/Products/Debug-iphoneos/MyApp\ Tests.xctest.dSYM /Users/dev1/Library/Developer/Xcode/Der

我想为我的应用程序创建一个测试目标

在添加测试目标之前,应用程序构建并运行良好 当我添加测试目标时,这是我尝试构建时显示的内容

生成的symfile/Users/dev1/Library/Developer/Xcode/DerivedData/MyApp-apigviljomlmendsdvrgelzkevw/Build/Products/Debug-iphoneos/MyApp\ Tests.xctest.dSYM /Users/dev1/Library/Developer/Xcode/DerivedData/MyApp-apigviljomlmendsdvrgelzkevw/Build/Products/Debug-iphoneos/MyApp\ Tests.xctest/MyApp\Tests cd/Users/dev1/Dev/IOSworkspace/MyApp

导出路径=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil /Users/dev1/Library/Developer/Xcode/DerivedData/MyApp-apigviljomlmendsdvrgelzkevw/Build/Products/Debug-iphoneos/MyApp\ Tests.xctest/MyApp\Tests-o /Users/dev1/Library/Developer/Xcode/DerivedData/MyApp-apigviljomlmendsdvrgelzkevw/Build/Products/Debug-iphoneos/MyApp\ Tests.xctest.dSYM

错误:无法打开可执行文件“/Users/dev1/Library/Developer/Xcode/DerivedData/MyApp-apigviljomlmendsdvrgelzkevw/Build/Products/Debug-iphoneos/MyApp Tests.xctest/MyApp Tests'

如何修复它?

答案是…:

测试目标中的Mach-O链接器标志设置为可执行,而不是捆绑


如本页所示:

那么您应该将此答案标记为正确,并将您的问题标记为重复