XCTest - “Test failed”

喜夏-厌秋 提交于 2019-11-30 19:32:35

You need to disable code signing in order to run unit tests. This page explains how to create a configuration for testing so that your debug and release applications are code signed but your unit tests are not. Don't forget to do a full clean after changing the configuration.

I had the same "no suitable image found" issue when was trying to add tests to an existing ios project. Try to go to Build Settings of your Tests target and set "Build Active Architecture Only" to "No". This solved my issue.

Also, make sure you have the same Architecture for both targets or you'll get strange linker errors.

I was facing a different issue but was seeing the same log. For the problem was that the deployment target of the tests target was higher than the iOS version of the simulator that I was trying to use.

I hope this helps someone.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!