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 Targets in Podfile (error: `Pods` already has a platform set) #15

Open buddhisthead opened 4 years ago

buddhisthead commented 4 years ago

If I have multiple targets in my Podfile, then I see an error during pod install

A Podfile with multiple Targets (watchOS, iOS, testing) that each define their platform will results in an error, though this is quite important to support. Thank you.

[!] Invalid `Podfile` file: The target `Pods` already has a platform set..

 #  from [redacted]/MergeCache/Podfile:4
 #  -------------------------------------------
 #  platform :ios, '11.0'
 >  platform :watchos, '3.1'
 #  install! 'cocoapods', :integrate_targets => false, :lock_pod_sources => false
 #  -------------------------------------------