Skip to content

Commit

Permalink
Merge pull request #153 from dirtmelon/master
Browse files Browse the repository at this point in the history
fix: 生成 podspec 时不删除 subspecs ,避免其他 pod 库有依赖 subspec 时报错
  • Loading branch information
su350380433 authored May 17, 2021
2 parents 8560960 + 008b196 commit 59eb0ca
Showing 1 changed file with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,6 @@ def create_from_code_spec
spec_hash.delete('resource_bundles')
spec_hash.delete('exclude_files')
spec_hash.delete('preserve_paths')

spec_hash.delete('subspecs')
spec_hash.delete('default_subspecs')
spec_hash.delete('default_subspec')
spec_hash.delete('vendored_frameworks')
spec_hash.delete('vendored_framework')

Expand Down Expand Up @@ -124,6 +120,16 @@ def create_from_code_spec
「 converted automatically by plugin cocoapods-imy-bin @厦门美柚 - slj 」
#{@spec.description}
EOF

# 处理一下 subspecs ,使用相同的配置
if @spec.subspecs
@spec.subspecs.each do |subspec|
subspec.source_files = binary_source_files
subspec.public_header_files = binary_public_header_files
subspec.vendored_libraries = binary_vendored_libraries
subspec.resources = binary_resources if @spec.attributes_hash.keys.include?("resources")
end
end
@spec
end

Expand Down

0 comments on commit 59eb0ca

Please sign in to comment.