重新定义模块'minizip'错误

时间:2018-03-09 18:36:56

标签: cocoapods dependency-management

我正在尝试创建一个COACOAPOD库,它使用IOS-Pods-DFU-Library作为依赖项之一。我正在使用COACOAPODS进行依赖管理。我将我的库作为二进制框架发布,客户将使用来自localhost服务器的COACOAPODS将其与他们的应用程序集成,我们的自定义podspec文件将从locahost服务器下载我们的二进制框架并解析其他依赖项。

在集成iOSDFULibrary之前,它曾经在Customer应用程序中正常工作。但在指定iOSDFULibrary后,我收到以下错误

CustomerTest/Pods/Zip/Zip/minizip/module.modulemap:1:8: error: redefinition of module 'minizip'
module minizip [system][extern_c] {
^
/Modules/xxxxxx/Pods/Zip/Zip/minizip/module.modulemap:1:8: note: previously defined here
module minizip [system][extern_c] {
^
:0: error: could not build Objective-C module 'Zip'

我在这里遗漏了什么吗?任何帮助将不胜感激。

以下是我们的示例podspec文件以及用户如何包含我们的库的示例。

Pod::Spec.new do |s|
s.name = "xxxxxx"
s.version = "1.0.0"
s.summary = "xxxxxx description ."
s.author = { "" => "" }
s.license = { :type => 'Apache-2.0', :file => 'LICENSE' }

s.ios.preserve_paths = 'xxxxxx.framework/*.bundle'

s.ios.deployment_target = "9.0"

s.source = { 
  :http => 'http://localhost:8000/xxxxxx.zip'
}  
s.ios.vendored_frameworks = 'xxxxxx.framework'
s.dependency 'SSZipArchive', ' 2.1'
s.dependency 'XCGLogger', ' 6.0'
s.dependency "iOSDFULibrary", '4.1.1'

end

客户将通过在pod文件

中指定以下podsepec文件路径来包含我们的库
pod 'xxxxxx', :podspec => './xxxxxx.podspec'

1 个答案:

答案 0 :(得分:0)

使用minizip Cocoapod时,我在Zip模块上遇到了同样的问题。对我来说,该模块在Pods项目和app项目中都被声明为double。是什么为我解决的was this answer