问题描述
我正在创建一个Cocoapod(MyPod
),它支持具有框架依赖性的iOS和tvOS。我没有访问框架代码的权限,但是拥有已编译的框架,因此将其称为ThirdParty.framework
。 iOS和tvOS的框架版本不同。
我能够直接在Xcode中成功构建构建MyPod
目标,并在其他项目中使用生成的框架。但是,要创建pod,在我运行pod lib lint
时会显示错误:
error: Failed to build module 'ThirdParty' from its module interface; the compiler that produced it,'Apple Swift version 5.1.2 (swiftlang-1100.0.278 clang-1100.0.33.9)',may have used features that aren't supported by this compiler,'Apple Swift version 5.3 (swiftlang-1200.0.29.2 clang-1200.0.30.1)'
这是我的podspec:
s.name = 'MyPod'
Pod::Spec.new do |s|
s.name = 'MyPod'
s.version = '0.1.0'
s.summary = 'This is MyPod'
s.description = <<-DESC
Provides functionality for ....
DESC
s.static_framework = true
s.homepage = 'https://github.com/username/MyPod'
s.license = { :type => 'MIT',:file => 'LICENSE' }
s.author = { 'username' => 'myemail@email.com' }
s.source = { :git => 'https://github.com/username/MyPod.git',:tag => s.version.to_s }
s.ios.deployment_target = '13.0'
s.swift_versions = '5.0'
s.ios.source_files = 'MyPod/Common/**/*.swift','MyPod/Platform/iOS/**/*.swift'
s.tvos.source_files = 'MyPod/Common/**/*.swift','MyPod/Platform/tvOS/**/*.swift'
s.ios.vendored_frameworks = 'MyPod/Frameworks/ios/universal/ThirdParty.framework'
s.tvos.vendored_frameworks = 'MyPod/Frameworks/tvos/universal/ThirdParty.framework'
s.preserve_path = 'MyPod/Frameworks'
end
我不完全理解该错误,但似乎当我运行pod lib lint
时,cocoapods试图重建框架。因此,问题是,有没有一种方法可以链接ThirdParty.framework
,而无需构建它来解决此错误?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)