Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Target has frameworks with conflicting names: googletoolboxformac. #6083

Closed
1 task done
tapz opened this issue Oct 25, 2016 · 11 comments
Closed
1 task done

Target has frameworks with conflicting names: googletoolboxformac. #6083

tapz opened this issue Oct 25, 2016 · 11 comments

Comments

@tapz
Copy link

tapz commented Oct 25, 2016

Report

What did you do?

pod update

What did you expect to happen?

Install all pod dependencies correctly and the project compiles without errors.

What happened instead?

If I include FireBase/Core to MyAppExtension target I get this error in pod update:
[!] The 'Pods-MyApp' target has frameworks with conflicting names: googletoolboxformac.

If I do NOT include FireBase/Core to MyAppExtension target I get a compiler error "Missing required Module ''Firebase".

Really don't understand why a framework is needed from a framework I have imported. What other frameworks the framework is using should be its internal matter. My projects are all Swift. Firebase is some binary only objective-c crap.

CocoaPods Environment

Stack

   CocoaPods : 1.1.1
        Ruby : ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-darwin14]
    RubyGems : 2.4.6
        Host : Mac OS X 10.12.1 (16B2555)
       Xcode : 8.1 (8T61a)
         Git : git version 2.9.3 (Apple Git-75)
Ruby lib dir : /Users/tapani/.rvm/rubies/ruby-2.2.1/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 5427dc44a5df9aa13c530cb9f30f28bee0b1feb3

Installation Source

Executable Path: /Users/tapani/.rvm/gems/ruby-2.2.1/bin/pod

Plugins

cocoapods-deintegrate : 1.0.1
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.0.0
cocoapods-trunk       : 1.1.1
cocoapods-try         : 1.1.0

Podfile

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!

install! 'cocoapods',
    :integrate_targets => true,
    :deduplicate_targets => true

target 'MyApp' do
    project '../MyApp.xcodeproj'

    target 'MyAppCore' do
        pod 'Firebase/Core'
        pod 'Firebase/Messaging'
        pod 'Firebase/RemoteConfig'
        pod 'GoogleSignIn'
    end

    target 'MyAppTests' do
      inherit! :search_paths
    end

    target 'MyAppExtension' do
        inherit! :search_paths
        pod 'Firebase/Core'
    end
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'NO'
      config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'NO'
    end
  end
end

Project that demonstrates the issue

@benasher44
Copy link
Member

This looks like a dup of #5643. Going to close this one. Thanks for filing!

@tapz
Copy link
Author

tapz commented Nov 16, 2016

When will there be a fix for this? Unable to use CocoaPods at all with my framework + share extension project! The RC did not give this error and everything worked just fine. Just change this to warning.

@zierka
Copy link

zierka commented Dec 8, 2016

This is a fairly common use case when having extensions, so it would be good to have some feedback from the team about this.

Maybe this comment could be a possible solution?

Other then that, a workaround is to make every "subpod" a standalone pod, but it's not the cleanest solution because it complicates the pod project (imports for example).

@lexin
Copy link

lexin commented Mar 28, 2017

Yes. with 1.2.0 Have this error. How to link pod to the extension target?

@a-v-ebrahimi
Copy link

Me too have same problem :|

@lexin
Copy link

lexin commented Mar 29, 2017

Installed cocoapods 1.1.1 vers
Everything is ok. But it's strange, why the last version cause an error.

@serges147
Copy link

Same problem with 1.2.1

@benasher44
Copy link
Member

If you could provide a Podfile that reproduces the issue, that'd be helpful!

@mxcl
Copy link

mxcl commented May 22, 2017

I have run into this issue with almost 7 projects now. I still have no idea why it happens, or how exactly it should be fixed. The linked threads in this thread have all been closed and so cannot be commented on. This is the only result for this issue that comes up in Google. I am a little frustrated here.

@shkron
Copy link

shkron commented May 24, 2017

The issue is with the extension. Somehow Google's frameworks (Firebase and regular Google) are conflicting when not added to both targets together (main and the extension).

The quick fix that worked for me is to either add GoogleSignIn or whatever Google module you are trying to add to the extension target as well as the main target, or remove any google module from extension target in Podfile and update if applicable.

Basically if you are using several Google modules, either mirror them to the extension target as well or exclude any/conflicting Google modules from the extension target in Podfile if applicable.

@mxcl hi from MM

@sbrighiu
Copy link

sbrighiu commented May 31, 2017

Guys, i've been developing custom keyboards for a while. Just use pod _1.0.1_ update to update your pods and all will be ok. This coupled with removing the Frameworks folder, for extensions, after the archive has been made (only do if you have issues with submitting to App Store), will save you a lot of time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants