title: Static Swift framework fails CocoaPods validation with `Undefined symbols for architecture`
body: <p>I am using Xcode 12.2, and working on a Swift static framework (embedded in a <code>.xcframework</code> in the end), which I intend to deliver with CocoaPods.</p>
  <p>My issue is currently not the CocoaPods integration in an app project (<code>pod install</code> works correctly and app builds &amp; run), but the pod validation with <code>pod lib lint</code> command.</p>
  <p>The <code>lint</code> validation fails, with logs containing the following:</p>
  <pre><code>ld: warning: Could not find or use auto-linked library 'swiftCoreGraphics'
  ld: warning: Could not find or use auto-linked library 'swiftObjectiveC'
  ld: warning: Could not find or use auto-linked library 'swiftUIKit'
  ld: warning: Could not find or use auto-linked library 'swiftDarwin'
  ld: warning: Could not find or use auto-linked library 'swiftDispatch'
  ld: warning: Could not find or use auto-linked library 'swiftAVFoundation'
  ld: warning: Could not find or use auto-linked library 'swiftAccelerate'
  ld: warning: Could not find or use auto-linked library 'swiftCoreImage'
  ld: warning: Could not find or use auto-linked library 'swiftCompatibilityDynamicReplacements'
      Undefined symbols for architecture x86_64:
        &quot;_OBJC_CLASS_$__TtCs12_SwiftObject&quot;, referenced from:
  [...]
  
  </code></pre>
  <p>And log contains the same with
  <code>Undefined symbols for architecture arm64</code></p>
  <p>My <code>.podspec</code> file is the following</p>
  <pre><code>Pod::Spec.new do |s|
    s.name             = 'MyFramework'
    s.version          = '1.0.0'
  
    s.source           = { :git =&gt; 'https://url-to-repo.git', :tag =&gt; s.version.to_s }
    
    s.ios.deployment_target = '12.0'
    s.platform = :ios
    s.swift_version = '5.0'
      
    s.requires_arc = true
    s.static_framework = true
        
    s.ios.vendored_frameworks = &quot;MyFramework.xcframework&quot;
    
    s.frameworks = 'AVFoundation', 'Accelerate', 'CoreGraphics', 'CoreImage'
    
    s.ios.library = 'z', 'c++'
  end
  </code></pre>
  <p>My guess is that the project that CocoaPods creates is with Objective-C, and there would be probably no reference to the Swift compiler or libraries.
  But I have no clues how to fix this..</p>
  <p>I've been losing days on this, any help would be greatly appreciated.</p>
  <p>Thanks</p>