title: CocoaPods file reference is a member of multiple groups
body: <p>I have an app with a share extension. My app depends on <code>CocoaLumberjack/Default</code>, and my share extension depends on <code>CocoaLumberjack/Core</code>. When I build with <code>use_frameworks!</code>, I get the following error:</p>
  
  <pre><code>$ rm -rf Pods Podfile.lock; pod install
  Updating local specs repositories
  Analyzing dependencies
  Downloading dependencies
  Installing CocoaLumberjack (2.0.3)
  Generating Pods project
  </code></pre>
  
  <blockquote>
    <p>2015-10-28 10:46:04.015 ruby[53095:3440989] warning:  The file
    reference for "CocoaLumberjack.framework" is a member of multiple
    groups ("Products" and "Products"); this indicates a malformed
    project.  Only the membership in one of the groups will be preserved
    (but membership in targets will be unaffected).  If you want a
    reference to the same file in more than one group, please add another
    reference to the same path.</p>
  </blockquote>
  
  <pre><code>Integrating client project
  Sending stats
  Sending stats
  Pod installation complete! There are 2 dependencies from the Podfile and 1 total
  pod installed.
  
  [!] [Xcodeproj] Generated duplicate UUIDs:
  </code></pre>
  
  <blockquote>
    <p>PBXFileReference --
    /mainGroup/children/children:displayName:CocoaLumberjack.framework,explicitFileType:wrapper.framework,includeInIndex:0,isa:PBXFileReference,name:CocoaLumberjack.framework,path:CocoaLumberjack.framework,sourceTree:BUILT_PRODUCTS_DIR,,displayName:CocoaLumberjack.framework,explicitFileType:wrapper.framework,includeInIndex:0,isa:PBXFileReference,name:CocoaLumberjack.framework,path:CocoaLumberjack.framework,sourceTree:BUILT_PRODUCTS_DIR,,displayName:Pods_MyProject.framework,explicitFileType:wrapper.framework,includeInIndex:0,isa:PBXFileReference,name:Pods_MyProject.framework,path:Pods_MyProject.framework,sourceTree:BUILT_PRODUCTS_DIR,,displayName:Pods_MyShare.framework,explicitFileType:wrapper.framework,includeInIndex:0,isa:PBXFileReference,name:Pods_MyShare.framework,path:Pods_MyShare.framework,sourceTree:BUILT_PRODUCTS_DIR,,displayName:Products,isa:PBXGroup,name:Products,sourceTree:,/Products/children/displayName:CocoaLumberjack.framework,explicitFileType:wrapper.framework,includeInIndex:0,isa:PBXFileReference,name:CocoaLumberjack.framework,path:CocoaLumberjack.framework,sourceTree:BUILT_PRODUCTS_DIR,/Products/CocoaLumberjack.framework</p>
  </blockquote>
  
  <p>This is my <code>Podfile</code>:</p>
  
  <pre><code>workspace 'MyWorkspace'
  xcodeproj 'MyProject/MyProject.xcodeproj'
  
  use_frameworks!
  
  source 'https://github.com/CocoaPods/Specs.git'
  
  link_with 'MyProject', 'MyShare'
  
  target :MyProject do
    pod 'CocoaLumberjack', '~&gt; 2.0.1'
  end
  
  target :MyShare do
    pod 'CocoaLumberjack/Core', '~&gt; 2.0.1'
  end
  </code></pre>
  
  <p>I was able to work around this problem by making both of my targets use the same <code>CocoaLumberjack</code> subspec. My working <code>Podfile</code> is below:</p>
  
  <pre><code>workspace 'MyWorkspace'
  xcodeproj 'MyProject/MyProject.xcodeproj'
  
  use_frameworks!
  
  source 'https://github.com/CocoaPods/Specs.git'
  
  link_with 'MyProject', 'MyShare'
  
  target :MyProject do
    pod 'CocoaLumberjack/Core', '~&gt; 2.0.1'
  end
  
  target :MyShare do
    pod 'CocoaLumberjack/Core', '~&gt; 2.0.1'
  end
  </code></pre>
  
  <p>Why is this workaround necessary? What happens when I actually have different subspec dependencies between two targets?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>This looks related to <a href="https://github.com/CocoaPods/CocoaPods/issues/4370" rel="noreferrer">CocoaPods Issue 4370</a>. I posted my example project on <a href="https://github.com/hborders/CocoaPods_4370_Example" rel="noreferrer">github</a>.</p>