任何人都有运气创建具有SSZipArchive依赖性的pod吗?我的课程都在Swift中,但我也包括我的桥接文件(#import" SSZipArchive")。当我尝试lint时,我得到9个与SSZipArchive相关的错误。请让我们知道你的想法。非常感谢!
这是我的pod规范文件:
Pod::Spec.new do |s|
s.name = "VideoPlayerLibrary"
s.version = "1.0.27"
s.platform = :ios, "4.0"
s.ios.deployment_target = "8.3"
s.requires_arc = true
s.source_files = 'Pod/Classes/*'
s.resource_bundles = {
'VideoPlayerLibrary' => ['Pod/Assets/*']
}
s.library = 'zlib', 'z'
s.frameworks = 'Foundation', 'UIKit'
s.dependency 'Alamofire'
s.dependency 'SSZipArchive'
end
答案 0 :(得分:0)
我迫不及待地想要一个更好的解决方案,我的临时解决方案是创建一个zipArchive类,它与objc中的SSZipArchive pod进行通信。不漂亮,不理想,但现在工作。我希望他们能尽快更新。
注意:您将在桥接头文件中导入zipArchive.h而不是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
您还需要在项目设置中设置“允许非模块化包含”
答案 1 :(得分:0)
我能够让SSZipArchive进行编译,但是在查看他们的快速示例https://github.com/ZipArchive/ZipArchive之后并没有完全复制他们的编译并为我运行的实现。
这是在我在swift
中搜索的各种现有建议没有成功之后我最终不得不调整框架源,复制链接器文件,标志,以使事情匹配并最终编译。这非常繁琐,因为我当前的pod甚至在我的项目中都有很多变化。