IOS编译报错‘ZipArchive.h‘ file not found|Use of undeclared identifier ‘SSZipArchive‘

出现场景

xcode编译一个项目,出现以下错误

'ZipArchive.h' file not found

在这里插入图片描述

Use of undeclared identifier 'SSZipArchive'

在这里插入图片描述

解决方法

根据错误,是没找到ZipArchive这个库。进入项目的Pods目录查看,没有发现这个库,但是找到了SSZipArchive这个库。
在这里插入图片描述
进入ZipArchive的github仓库地址,发现库的名字已经改为了SSZipArchive
在这里插入图片描述
使用方法也提到了。如果使用的是CocoaPods,在代码中导入必须使用#import <SSZipArchive.h>
在这里插入图片描述
所以我们只需要在用到这个库的代码中,将ZipArchive改为SSZipArchive即可。

//#import <ZipArchive.h>
#import <SSZipArchive.h>

猜你喜欢

转载自blog.csdn.net/adojayfan/article/details/124539800