grab / cocoapods-pod-merge

Cocoapods plugin to merge pods used by your Xcode project, reducing the number of dynamic frameworks your app has to load on startup
MIT License
375 stars 24 forks source link

Support multiple level dependance #16

Open Chren opened 4 years ago

Chren commented 4 years ago

Hi, we have pod structure as below:

ModuleA.podspec s.dependency 'AFNetworking'

MergeFile:

group 'Networking' has_dependencies! pod 'AFNetworking' pod 'CustomNetwork', :path => "../../../path" end

Podfile

target 'target' do pod 'Networking', :path => 'MergedPods/Networking' pod 'ModuleA' end

After run 'bundle exec pod install' I got two AFNetworking in pod project. One is under Development Pods, another is under Pods, how to solve it?

biocross commented 4 years ago

Hello,

Thanks for reporting this. Unfortunately this is something the plugin cannot handle, since it'll not modify dependencies outside of the MergeFile.

One way to fix this in your case is to also try merging ModuleA into the Networking group:

group 'Networking' 
    has_dependencies! 
    pod 'AFNetworking' 
    pod 'CustomNetwork', :path => "../../../path"
    pod 'ModuleA' 
end