Search code examples
swift3cocoapodsxcode8alamofiretoday-extension

Conflicting names error when installing Alamofire pod


I created an app with a watch and a today extension running Xcode 8.2.1. with Swift 3. For all targets, I want to use Alamofire to fire up requests. This worked perfectly fine with the iOS app and the Watch Extension, but pod install throws following error when trying to add it to the today target:

The 'Pods-xY' target has frameworks with conflicting names: alamofire.

Here's my podfile:

target 'xY' do
  use_frameworks!
  pod 'Alamofire', '~> 4.4'
end

target 'xYToday' do
  use_frameworks!
  pod 'Alamofire', '~> 4.4'
end

target 'xYWatch Extension' do
  use_frameworks!
  pod 'Alamofire', '~> 4.4'
end

Solution

  • I ran into the same issue, just today. Apparently it is not possible to use the same framework in a today extension and in an app. See this comment.

    Cocoapods should give a decent error message, which is a bug, but for now, only Apple could fix this like both you and I would have expected, see this comment by the same guy later in the thread.

    Bummer!