最近在将Telegram改成pod引入时遇到的一些问题
target has transitive dependencies that include static binaries
以webp为例,podspec的写法
Pod::Spec.new do |s|
s.name = "webp"
s.version = "1.0.0"
s.authors = { 'xxx' => 'xx@xx.dev'}
s.summary = 'xxxx'
s.source = { :git => "https://github.com/TextureGroup/Texture.git", :tag => s.version.to_s }
s.license = 'MIT'
s.homepage = 'http://www.example.com'
s.requires_arc = true
s.ios.deployment_target = "12.0"
# 使用编译后的内容
s.public_header_files = ['Public/**/*.h']
s.source_files = ["Public/**/*.h"]
# 依赖的静态库
s.ios.vendored_libraries = 'Public/**/*.a'
s.static_framework = true
# s.ios.vendored_frameworks = 'xxx/xxx.framework'
s.frameworks = "Foundation", "UIKit"
end
解决方案,修改Podfile的写法use_frameworks! :linkage => :static
Podfile的写法
platform :ios, '12.0'
target 'StudyAsynDisplay' do
use_frameworks! :linkage => :static
# Pods for StudyAsynDisplay
pod "webp", :path => 'LocalLib/webp'
end