关键是确保
/minizip/ 下的所有.c文件都添加到“ Build Phases >
Compiled Sources ”
对于想要使用SSZipArchive的Cordova开发人员,请确保不要将整个 /minizip/ 文件夹作为源文件包含在 plugin.xml 中,
<source-file src="src/ios/minizip"/>
^^^^^^^^不!
将它们分别包含为 和 :
<header-file src="src/ios/minizip/crypt.h" target="crypt.h" />
<source-file src="src/ios/minizip/ioapi.c" target="ioapi.c" />
<header-file src="src/ios/minizip/ioapi.h" target="ioapi.h" />
<source-file src="src/ios/minizip/mztools.c" target="mztools.c" />
<header-file src="src/ios/minizip/mztools.h" target="mztools.h" />
<source-file src="src/ios/minizip/unzip.c" target="unzip.c" />
<header-file src="src/ios/minizip/unzip.h" target="unzip.h" />
<source-file src="src/ios/minizip/zip.c" target="zip.c" />
<header-file src="src/ios/minizip/zip.h" target="zip.h" />