Cocoapods: Target has frameworks with conflicting names

Created on 30 Jan 2017  Â·  15Comments  Â·  Source: CocoaPods/CocoaPods

Report

What did you do?

Run pod Update.

What did you expect to happen?

Install all pod dependencies correctly.

What happened instead?

Getting the Error - [!] The 'Pods-MainApp' target has frameworks with conflicting names: alamofire.

SwiftyDropBox is using alamofire version 4.0.1 and I have set the same version in my pod file as well so that the conflict doesn't happen. And yet am facing the issue.

Even After a pod deintegrate and trying to install again with verbose option, I see the following...

-> Installing SwiftyDropbox (4.1.1)
  > Copying SwiftyDropbox from `/Users/akshay/Library/Caches/CocoaPods/Pods/Release/SwiftyDropbox/4.1.1-dfcd4` to `Pods/SwiftyDropbox`
  - Running pre install hooks
[!] The 'Pods-AppName’ target has frameworks with conflicting names: alamofire.

/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer.rb:415:in `verify_no_duplicate_names'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer.rb:402:in `block (2 levels) in verify_no_duplicate_framework_and_library_names'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer.rb:396:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer.rb:396:in `block in verify_no_duplicate_framework_and_library_names'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer.rb:395:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer.rb:395:in `verify_no_duplicate_framework_and_library_names'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer.rb:112:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-keys-1.6.0/lib/plugin.rb:99:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/command/install.rb:37:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-1.0.1/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:22:in `load'
/usr/local/bin/pod:22:in `<main>'

[!] Your Podfile has had smart quotes sanitised. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes in your editor of choice.

CocoaPods Environment

Ignoring jazzy-0.6.0 because its extensions are not built. Try: gem pristine jazzy --version 0.6.0
Ignoring nokogiri-1.6.7.2 because its extensions are not built. Try: gem pristine nokogiri --version 1.6.7.2
Ignoring redcarpet-3.3.4 because its extensions are not built. Try: gem pristine redcarpet --version 3.3.4

Stack

   CocoaPods : 1.2.0
        Ruby : ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
    RubyGems : 2.6.4
        Host : Mac OS X 10.12.2 (16C67)
       Xcode : 8.2.1 (8C1002)
         Git : git version 2.10.1 (Apple Git-78)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib
Repositories : iOS-App-V2-PodSpecs - https://github.com/appName/iOS-App-V2-PodSpecs.git @ ed20421e816a2b07f161b3761f97e5e683759b3a
               master - https://github.com/CocoaPods/Specs.git @ 13ec689bbed60f2103c5b416f375cc0d790e43fb

Installation Source

Executable Path: /usr/local/bin/pod

Plugins

cocoapods-deintegrate : 1.0.1
cocoapods-keys        : 1.6.0
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.0.0
cocoapods-trunk       : 1.1.2
cocoapods-try         : 1.1.0

Podfile

platform :ios, '9.0'
 use_frameworks!

#######################  Pods clubbed in with definitions so that it can shared ##############################

# Pods for XML Parsing
def xml_parsing
   pod 'SWXMLHash', '~> 3.0.0'
end


# Pods for Rx Swift
def rx_swift_pods

    pod 'RxSwift'

end

# Pods for Rx Cocoa
def rx_cocoa_pods

    pod 'RxCocoa'

end

# Pods for All Rx
def rx_pods

    rx_swift_pods
    rx_cocoa_pods

end

# Pods for keychain
def keychain_pods

    pod 'SAMKeychain'

end


# Pods for logging
def logging_pods

    pod 'CocoaLumberjack/Swift'

end

# Pods for Code Generation
def code_generation_pods

    pod 'R.swift' #~> '3.0.0'

end

# Pods for Analytics
def analytics_pods

    pod 'Mixpanel'
    pod 'AppsFlyerFramework’

end

# Pods for Crash Reporting
def crash_reporting_pods

    pod 'Fabric'
    pod 'Crashlytics'

end

# Pods for Networking
def networking_pods

    pod 'Alamofire', '~> 4.0.1'
    pod 'ObjectMapper' #~> '2.0.0'
    pod 'CryptoSwift' #~> '0.6.0'
    rx_swift_pods
    keychain_pods
    xml_parsing

end

# Pods used for Core Data
def coredata_pods

    pod 'SugarRecord/CoreData'

end

# Pods for Cloud File Import
def cloud_import_pods

    pod 'SwiftyDropbox', '~> 4.1.1'
#    pod 'box-ios-sdk', '1.0.11'
    pod 'GoogleAPIClient/Drive'
    pod 'GTMOAuth2'
    pod 'OneDriveSDK'

end

# PDF Pods
def pdf_pods
    pod 'PSPDFKit'
end

########################## Podas for appName App Target and Test targets #########################################

target 'appName' do

    pod 'SVProgressHUD'
    pod 'Google/SignIn'
    pod 'FBSDKLoginKit'
    pod 'MFSideMenu'
    pod 'RMStore', '~> 0.7'
    pod 'MobihelpSDK'

    rx_pods
    keychain_pods
    logging_pods
    coredata_pods
    code_generation_pods
    xml_parsing
    crash_reporting_pods

    target 'appNameTests' do
        inherit! :search_paths

    end

    target 'appNameUITests' do
        inherit! :search_paths

    end

end

######################## Pods Used for appNameNetworking Target and Test targets ###################################

target 'appNameNetworking' do

    networking_pods
    logging_pods
    code_generation_pods
    xml_parsing

   target 'appNameNetworkingTests' do
       inherit! :search_paths

   end
end


######################## Pods Used for appNamePDFEditing Target and Test targets ###################################

target 'appNamePDFEditing' do

    pod 'SVProgressHUD'
    pdf_pods
    rx_pods
    logging_pods
    code_generation_pods

    target 'appNamePDFEditingTests' do
        inherit! :search_paths

    end

end


###################### Pods Used for appNameAnalytics Target and Test Targets #####################################

target 'appNameAnalytics' do

    rx_swift_pods
    analytics_pods
    logging_pods
    code_generation_pods
    keychain_pods

    target 'appNameAnalyticsTests' do
        inherit! :search_paths

    end
end

###################### Pods Used for appNameSignatures Target and Test Targets #####################################

target 'appNameSignatures' do

    rx_pods
    logging_pods
    code_generation_pods
    keychain_pods

    target 'appNameSignaturesTests' do
        inherit! :search_paths

    end
end

###################### Pods Used for appNameDatabase Target and Test Targets #####################################

target 'appNameDatabase' do

    rx_pods
    logging_pods
    code_generation_pods
    coredata_pods
    pdf_pods

    target 'appNameDatabaseTests' do
        inherit! :search_paths

    end
end

###################### Pods Used for Action Extention Target and Test Targets #####################################

target 'ActionExtension' do

    rx_pods
    logging_pods
    code_generation_pods
    coredata_pods
    keychain_pods
    pdf_pods

end

###################### Pods Used for Notification Content Extention Target and Test Targets #####################################

target 'NotificationContent' do

    rx_pods
    logging_pods
    code_generation_pods
    coredata_pods
    pdf_pods
end


###################### Pods Used for Notification Service Extention Target and Test Targets #####################################

target 'NotificationService' do
    keychain_pods
    logging_pods

end


###################### Pods Used to Access Cloud Libraries #####################################

target 'CloudAccess' do

    rx_pods
    logging_pods
    code_generation_pods
    cloud_import_pods
    pod 'SVProgressHUD'
    keychain_pods

    target 'CloudAccessTests' do
        inherit! :search_paths

    end
end
awaiting input

Most helpful comment

Any updates on this? Simply inheriting the parent's search paths won't work because extensions often can't include the parent files or have different build flags.

All 15 comments

Just running pod Install --verbose without any changes, in a project which was working till now still gives me an error.

Ignoring jazzy-0.6.0 because its extensions are not built.  Try: gem pristine jazzy --version 0.6.0
Ignoring nokogiri-1.6.7.2 because its extensions are not built.  Try: gem pristine nokogiri --version 1.6.7.2
Ignoring redcarpet-3.3.4 because its extensions are not built.  Try: gem pristine redcarpet --version 3.3.4
  Preparing

Analyzing dependencies

Inspecting targets to integrate
  Using `ARCHS` setting to build architectures of target `Pods-appName`: (``)
  Using `ARCHS` setting to build architectures of target `Pods-appNameNetworking`: (``)
  Using `ARCHS` setting to build architectures of target `Pods-appNamePDFEditing`: (``)
  Using `ARCHS` setting to build architectures of target `Pods-appNameAnalytics`: (``)
  Using `ARCHS` setting to build architectures of target `Pods-appNameSignatures`: (``)
  Using `ARCHS` setting to build architectures of target `Pods-appNameDatabase`: (``)
  Using `ARCHS` setting to build architectures of target `Pods-ActionExtension`: (``)
  Using `ARCHS` setting to build architectures of target `Pods-NotificationContent`: (``)
  Using `ARCHS` setting to build architectures of target `Pods-NotificationService`: (``)
  Using `ARCHS` setting to build architectures of target `Pods-CloudAccess`: (``)
  Using `ARCHS` setting to build architectures of target `Pods-appNameTests`: (``)
  Using `ARCHS` setting to build architectures of target `Pods-appNameUITests`: (``)
  Using `ARCHS` setting to build architectures of target `Pods-appNameNetworkingTests`: (``)
  Using `ARCHS` setting to build architectures of target `Pods-appNamePDFEditingTests`: (``)
  Using `ARCHS` setting to build architectures of target `Pods-appNameAnalyticsTests`: (``)
  Using `ARCHS` setting to build architectures of target `Pods-appNameSignaturesTests`: (``)
  Using `ARCHS` setting to build architectures of target `Pods-appNameDatabaseTests`: (``)
  Using `ARCHS` setting to build architectures of target `Pods-CloudAccessTests`: (``)

Finding Podfile changes
  - Alamofire
  - AppsFlyerFramework
  - CocoaLumberjack
  - Crashlytics
  - CryptoSwift
  - FBSDKLoginKit
  - Fabric
  - GTMOAuth2
  - Google
  - GoogleAPIClient
  - MFSideMenu
  - Mixpanel
  - MobihelpSDK
  - ObjectMapper
  - OneDriveSDK
  - PSPDFKit
  - R.swift
  - RMStore
  - RxCocoa
  - RxSwift
  - SAMKeychain
  - SVProgressHUD
  - SWXMLHash
  - SugarRecord
  - SwiftyDropbox
  - box-ios-sdk

Resolving dependencies of `Podfile`

Comparing resolved specification to the sandbox manifest
  - ADALiOS
  - Alamofire
  - AppsFlyerFramework
  - Base32
  - Bolts
  - CocoaLumberjack
  - Crashlytics
  - CryptoSwift
  - FBSDKCoreKit
  - FBSDKLoginKit
  - Fabric
  - FirebaseAnalytics
  - FirebaseCore
  - FirebaseInstanceID
  - GTMOAuth2
  - GTMSessionFetcher
  - Google
  - GoogleAPIClient
  - GoogleAppUtilities
  - GoogleInterchangeUtilities
  - GoogleSignIn
  - GoogleSymbolUtilities
  - GoogleToolboxForMac
  - MFSideMenu
  - Mixpanel
  - MobihelpSDK
  - ObjectMapper
  - OneDriveSDK
  - PSPDFKit
  - R.swift
  - R.swift.Library
  - RMStore
  - Result
  - RxCocoa
  - RxSwift
  - SAMKeychain
  - SVProgressHUD
  - SWXMLHash
  - SugarRecord
  - SwiftyDropbox
  - box-ios-sdk

Downloading dependencies

-> Using ADALiOS (1.2.9)

-> Using Alamofire (4.0.1)

-> Using AppsFlyerFramework (4.5.9)

-> Using Base32 (1.1.2)

-> Using Bolts (1.8.4)

-> Using CocoaLumberjack (3.0.0)

-> Using Crashlytics (3.8.3)

-> Using CryptoSwift (0.6.6)

-> Using FBSDKCoreKit (4.17.0)

-> Using FBSDKLoginKit (4.17.0)

-> Using Fabric (1.6.11)

-> Using FirebaseAnalytics (3.5.1)

-> Using FirebaseCore (3.4.4)

-> Using FirebaseInstanceID (1.0.8)

-> Using GTMOAuth2 (1.1.4)

-> Using GTMSessionFetcher (1.1.7)

-> Using Google (3.0.3)

-> Using GoogleAPIClient (1.0.5)

-> Using GoogleAppUtilities (1.1.2)

-> Using GoogleInterchangeUtilities (1.2.2)

-> Using GoogleSignIn (4.0.1)

-> Using GoogleSymbolUtilities (1.1.2)

-> Using GoogleToolboxForMac (2.1.0)

-> Using MFSideMenu (0.5.5)

-> Using Mixpanel (3.0.6)

-> Using MobihelpSDK (1.6.9)

-> Using ObjectMapper (2.2.1)

-> Using OneDriveSDK (1.2.2)

-> Using PSPDFKit (6.1.0)

-> Using R.swift (3.1.0)

-> Using R.swift.Library (3.0.2)

-> Using RMStore (0.7.1)

-> Using Result (3.0.0)

-> Using RxCocoa (3.0.1)

-> Using RxSwift (3.0.1)

-> Using SAMKeychain (1.5.2)

-> Using SVProgressHUD (2.0.3)

-> Using SWXMLHash (3.0.2)

-> Using SugarRecord (3.0.0)

-> Using SwiftyDropbox (4.0.6)

-> Using box-ios-sdk (1.0.14)
  - Running pre install hooks
[!] The 'Pods-appName' target has frameworks with conflicting names: alamofire, cryptoswift, and objectmapper.

/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer.rb:415:in `verify_no_duplicate_names'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer.rb:402:in `block (2 levels) in verify_no_duplicate_framework_and_library_names'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer.rb:396:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer.rb:396:in `block in verify_no_duplicate_framework_and_library_names'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer.rb:395:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer.rb:395:in `verify_no_duplicate_framework_and_library_names'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer.rb:112:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-keys-1.6.0/lib/plugin.rb:99:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/command/install.rb:37:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-1.0.1/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:22:in `load'
/usr/local/bin/pod:22:in `<main>'

I have a similar problem with CocoaPods 1.2.0. I created a minimal sample project:
https://github.com/hannesoid/cocoapods-conflicing-names

Podfile

use_frameworks!

target 'Foo' do
end

target 'A' do
  pod 'Decodable'
end

target 'B' do
  pod 'Decodable'
end

pod install leads to
[!] The 'Pods-Foo' target has frameworks with conflicting names: decodable.

Workaround

use_frameworks!

target 'Foo' do
end

target 'A' do
  pod 'Decodable'
    target 'B' do
      inherit! :search_paths
      # pod 'Decodable' # uncommenting this leads to the same issue
    end
end

I have the same issue, and it's happening from the update to Cocoapods 1.2.0 (no issue with 1.1.1)

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Any updates on this? Simply inheriting the parent's search paths won't work because extensions often can't include the parent files or have different build flags.

We see the regression with 1.1.1 too, 1.0.0 is fine though.

See issue #6711, I think it's the same.

@zierka it doesn’t seem so, in our case the problem is with the bolts framework, both dependency of Parse and FBSDKCoreKit. Removing FBSDKCoreKit makes the issue go away. I may be wrong.

I'm seeing this issue when trying to link the same pod against an app target (iOS) and a tvOS target, when there should be no conflict (since they are both complete apps in their own, not extensions).

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem :+1:

Was this page helpful?
0 / 5 - 0 ratings