jherran jherran - 1 year ago 121
iOS Question

Prevent "There are multiple dependencies with different sources" using cocoa pods

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 (HEAD)

  • Analytics (from

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'

Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download