Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent "There are multiple dependencies with different sources" using CocoaPods

Tags:

ios

cocoapods

I use a combination of own and external pods in several projects. If I'm developing or updating a pod, I use a Podfile.local to avoid versioning/tagging every single change. The issue here, if that I must update Podfile to comment out every pod I'm using in Podfile.local to avoid errors.

Is there any way of telling cocoapods that should consider Podfile.local over Podfile when both files have the same pod to prevent this errors:

Analyzing dependencies [!] There are multiple dependencies with different sources for Analytics in Podfile:

  • Analytics (HEAD)
  • Analytics (from ~/Documents/analytics_ios)

My Podfile:

source 'https://github.com/CocoaPods/Specs.git'
source 'http://gitlab.whatever.com/podfolder/cocoapods_ios.git'
platform :ios, '7.0'

# Allows per-dev overrides
local_podfile = "Podfile.local"
eval(File.open(local_podfile).read) if File.exist? local_podfile

pod 'Advertising/Dfp', :head
pod 'RSSParser', :head
pod 'DTCoreText'
pod "AFNetworking", "~> 2.0"
pod 'OurKeyboard', :head
pod 'VideoPlayer/GooglePrerollForAdMob', :head
pod 'Analytics', :head
pod 'AppVersioning', :head

My Podfile.local:

pod 'Analytics', :path => '~/Documents/analytics_ios'
like image 769
jherran Avatar asked Nov 19 '25 21:11

jherran


1 Answers

The Podfile.local trick is no longer possible since CocoaPods 0.35 and was never officially supported.
See https://github.com/CocoaPods/CocoaPods/issues/2860

like image 120
fluidsonic Avatar answered Nov 21 '25 12:11

fluidsonic



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!