我想为我的应用创建一个测试目标
在添加测试目标之前,应用程序构建并运行良好
当我添加测试目标时,这是我尝试构建时显示的内容
GenerateDSYMFile / Users / dev1 / Library / Developer / Xcode / DerivedData / MyApp-apigviljomlmendsdvrgealzkevw / Build / Products / Debug-iphoneos / MyApp \ Tests.xctest.dSYM / Users / dev1 / Library / Developer / Xcode / DerivedData / MyApp-apigviljomlmendsdvrgealzkevw / Build / Products / Debug-iphoneos / MyApp \ Tests.xctest / MyApp \ Tests cd / Users / dev1 / Dev / IOSworkspace / MyApp export PATH =“/ Applications / Xcode.app / Contents / Developer / Platforms / iPhoneOS.platform /开发人员/ 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-apigviljomlmendsdvrgealzkevw / Build / Products / Debug-iphoneos / MyApp \ Tests.xctest / MyApp \ Tests -o / Users / dev1 / Library / Developer / Xcode / DerivedData / MyApp-apigviljomlmendsdvrgealzkevw / Build / Products / Debug-iphoneos / MyApp \ Tests.xctest.dSYM错误:无法打开可执行文件'/ Users / dev1 / Library / Developer / Xcode / DerivedData / MyApp-apig viljomlmendsdvrgealzkevw / Build / Products / Debug-iphoneos / MyApp Tests.xctest / MyApp Tests'
我如何解决它 ?
1 回答
答案是... :
测试目标中的Mach-O Linker标志设置为“可执行”而不是“捆绑” .
在此页面上显示:https://stackoverflow.com/a/19325817/2136812