Lint a Swift cocoa pod with SSZipArchive dependency

懵懂的女人 提交于 2019-12-05 12:59:05

I couldn't wait for a better solution, my temporary solution was to create a zipArchive class which talks to the SSZipArchive pod in objc. Not pretty and not ideal but works for now. I hope they update it soon.

Note: you would import zipArchive.h in your bridging-header file and not SSZipArchive.h

#import "zipArchive.h"
#import <SSZipArchive/SSZipArchive.h>

@implementation zipArchive

+ (BOOL)unzipFileAtPath:(NSString *)path toDestination:(NSString *)destination{
    return [SSZipArchive unzipFileAtPath:path toDestination:destination];
}

@end

You also need to set "Allow Non-modular includes" in your project settings

I was able to get SSZipArchive to compile but it was not after looking at their swift example https://github.com/ZipArchive/ZipArchive and copying their implementation exactly which compiled and ran for me.

this was after no success doing the various existing suggestions I have searched for in swift

I ended up having to adjust framework source , copy linker files, flags, to get things to match and eventually compile. It was pretty tedious because there were quite a number of changes in my current pod and even in my project .

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