在Xcode中没有添加UITests桥接头文件

时间:2023-01-21 15:05:33

I have recently started testing my app with UITesting which was recently introduced by Apple. But the problem is the UITest is not able to use the Header file which I created to use some ObjC libraries. This is causing the UItest to fail. I have already tried manually changing the header file name in Target tab under Build Settings still the same error.

我最近开始使用最近由Apple推出的UITesting测试我的应用程序。但问题是UITest无法使用我创建的Header文件来使用一些ObjC库。这导致UItest失败。我已经尝试在Build Settings下的Target选项卡中手动更改头文件名仍然是同样的错误。

在Xcode中没有添加UITests桥接头文件

And this is my header file name 在Xcode中没有添加UITests桥接头文件

这是我的头文件名

Changed name of header file which should be used by UITests. 在Xcode中没有添加UITests桥接头文件

更改了UITests应该使用的头文件的名称。

My app is building and running fine but the UITests are creating problem. Could you please tell me how do I solve this problem?

我的应用程序正在构建并运行良好,但UITests正在创建问题。你能告诉我如何解决这个问题吗?

Thank You.

谢谢。

1 个解决方案

#1


2  

Choose Pods.debug and Pods.release configuration for the tests target (if currently set to none)

为测试目标选择Pods.debug和Pods.release配置(如果当前设置为none)

You can find this setting in the "Configurations" section

您可以在“配置”部分中找到此设置

Good luck! Let me know if this works :-)

祝你好运!让我知道这个是否奏效 :-)

EDIT: There is a extensive version of my answer with screenshots here

编辑:这里有截图的广泛版本的答案

#1


2  

Choose Pods.debug and Pods.release configuration for the tests target (if currently set to none)

为测试目标选择Pods.debug和Pods.release配置(如果当前设置为none)

You can find this setting in the "Configurations" section

您可以在“配置”部分中找到此设置

Good luck! Let me know if this works :-)

祝你好运!让我知道这个是否奏效 :-)

EDIT: There is a extensive version of my answer with screenshots here

编辑:这里有截图的广泛版本的答案