title: Cocoapod dependency in iosMain of a Kotlin Multiplatform project, cocoapod unresolved reference
body: <p>I am trying to create a wrapper around AWS Amplify to use for my project. I have a module inside my shared ( common ) module called Amplify. Here I <a href="https://kotlinlang.org/docs/native-cocoapods.html" rel="nofollow noreferrer">integrated cocoapods as instructed</a> in the official docs. But when I try to import anything from the iosMain I keep getting <code>Unresolved reference: cocoapods</code>.</p>
  <p>My project structure is as follows</p>
  <p>Common module (shared) <br />
  |- root module  <br />
  |- other features   <br />
  |- amplify wrapper module</p>
  <p>In the root module I have the</p>
  <pre><code>kotlin {
      ios {
          binaries {
              framework {
                  baseName = &quot;Framework&quot;
                  linkerOpts.add(&quot;-lsqlite3&quot;)
                  export(project(&quot;:common:main&quot;))
              }
          }
      }
  </code></pre>
  <p>And the setup for the cocoapods in the amplify module</p>
  <pre><code>import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
  
  plugins {
      id(&quot;multiplatform-setup&quot;) // this is from buildSrc, it adds the multiplatform plugin
      id(&quot;android-setup&quot;)
      id(&quot;org.jetbrains.kotlin.native.cocoapods&quot;)
      kotlin(&quot;plugin.serialization&quot;) version &quot;1.5.10&quot;
  }
  
  version = &quot;1.0&quot;
  
  
  kotlin {
      sourceSets {
          named(&quot;commonMain&quot;) {
              dependencies {
              }
          }
      }
  
      cocoapods {
          summary = &quot;Amplify wrapper for KMP project&quot;
          homepage = &quot;Link to a Kotlin/Native module homepage&quot;
          frameworkName = &quot;AmplifyKMP&quot;
  
          pod(&quot;Amplify&quot;)
          pod(&quot;AmplifyPlugins/AWSCognitoAuthPlugin&quot;)
          pod(&quot;AmplifyPlugins/AWSPinpointAnalyticsPlugin&quot;)
      }
  }
  </code></pre>
  <p>My idea is that I'd be able to expose my wrapper from the commonMain code, that would call   actual implementations from the Amplify Android and Amplify IOS libraries. My first problem is the cocoapods being unresolved and secondly all of the examples from the official docs and github all have cocoapods in the main module (root module in my case) from where they export the framework, I am not sure my approach is even feasible.</p>