Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios xcode UITests不';在appdelegate中找不到头文件_Ios_Objective C_Swift_Xctest - Fatal编程技术网

Ios xcode UITests不';在appdelegate中找不到头文件

Ios xcode UITests不';在appdelegate中找不到头文件,ios,objective-c,swift,xctest,Ios,Objective C,Swift,Xctest,我有一个XCEST UI捆绑包,当我想运行测试时,它会给我以下错误: AppDelegate.h:10:9: error: 'SVProgressHUD/SVProgressHUD.h' file not found #import <SVProgressHUD/SVProgressHUD.h> ^ <unknown>:0: error: failed to import bridging header 'Supporting files/LZ-Bridg

我有一个XCEST UI捆绑包,当我想运行测试时,它会给我以下错误:

AppDelegate.h:10:9: error: 'SVProgressHUD/SVProgressHUD.h' file not found
#import <SVProgressHUD/SVProgressHUD.h>
        ^
<unknown>:0: error: failed to import bridging header 'Supporting files/LZ-Bridging-Header.h'
AppDelegate.h:10:9:错误:“未找到SVProgressHUD/SVProgressHUD.h”文件
#进口
^
:0:错误:导入桥接头“支持文件/LZ桥接头.h”失败
应用程序本身运行,所以我看不出问题。我用迦太基作为依赖,所以没有Cocoapod。我在网上找不到任何与这个问题有关的东西

我已经清理了我的派生数据、干净的构建、干净的xcode。所以我愿意接受建议


有人能帮我吗

您可以通过将头导入移动到
AppDelegate.m
文件中并向
.h
文件添加前向声明来尝试隐藏头依赖关系,这将解决桥接头问题。您可能需要为头文件中使用的所有类添加前向声明。您是对的。这解决了很多问题。对于.pch文件中的一些库,我也有同样的问题。你知道有什么解决办法吗?嗯。。。您是否对测试目标和测试目标使用了相同的桥接头?您可以尝试通过将头导入移动到
AppDelegate.m
文件中,并将前向声明添加到
.h
文件中来隐藏头依赖性,这将解决桥接头的问题。您可能需要为头文件中使用的所有类添加前向声明。您是对的。这解决了很多问题。对于.pch文件中的一些库,我也有同样的问题。你知道有什么解决办法吗?嗯。。。您是否为测试和测试目标使用了相同的桥接头?