title: КММ custom iOS framework - could not build module
body: <p>I'm trying to import my ios framework, from where I'm getting this error:</p>
  <p><code>fatal error: could not build module 'FRAMEWORK_IOS'</code></p>
  <p>Also I successfully imported other third party frameworks like: mapbox and firebase framework.</p>
  <p>Overall this error that I'm getting is not very clear and I cannot locate what is causing the problem, because if I directly load that custom framework from xcode it's gonna work as expected.</p>
  <p>gradle:</p>
  <pre><code>ios {
  val frameworkLocation = File(&quot;/Users/user/Desktop/MyProject/shared/src/iosArm64Main/SDK&quot;)
  val frameworks = &quot;-F$frameworkLocation&quot;
  compilations {
      @Suppress(&quot;UNUSED_VARIABLE&quot;)
      val main by getting {
          cinterops {
              val FRAMEWORK_IOS by creating {
                  defFile = File(&quot;/Users/user/Desktop/MyProject/shared/src/nativeInterop/cinterop/FRAMEWORK_IOS.def&quot;)
                  compilerOpts(frameworks)
              }
          }
      }
  }
  binaries.matching { it is org.jetbrains.kotlin.gradle.plugin.mpp.Framework }
      .configureEach {
          val framework = this as org.jetbrains.kotlin.gradle.plugin.mpp.Framework
          framework.linkerOpts(frameworks)
      }
  }
  </code></pre>
  <p>def</p>
  <pre><code>language = Objective-C
  modules = FRAMEWORK_IOS
  linkerOpts = -framework FRAMEWORK_IOS
  </code></pre>
  <p>error:</p>
  <pre><code>Exception in thread &quot;main&quot; java.lang.Error: /var/folders/ll/7t94x_gn5nz24xb1f1v_02q40000gr/T/7671724635539436126.m:1:9: fatal error: could not build module 'FRAMEWORK_IOS'
  at org.jetbrains.kotlin.native.interop.indexer.UtilsKt.ensureNoCompileErrors(Utils.kt:152)
  at org.jetbrains.kotlin.native.interop.indexer.ModuleSupportKt.getModulesASTFiles(ModuleSupport.kt:68)
  at org.jetbrains.kotlin.native.interop.indexer.ModuleSupportKt.getModulesInfo(ModuleSupport.kt:14)
  at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.buildNativeLibrary(main.kt:515)
  at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.processCLib(main.kt:266)
  at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.interop(main.kt:76)
  at org.jetbrains.kotlin.cli.utilities.InteropCompilerKt.invokeInterop(InteropCompiler.kt:45)
  at org.jetbrains.kotlin.cli.utilities.MainKt.mainImpl(main.kt:38)
  at org.jetbrains.kotlin.cli.utilities.MainKt.main(main.kt:60)
  
    FAILURE: Build failed with an exception.
  
    * What went wrong:
    Execution failed for task ':shared:cinteropFRAMEWORK_IOSIosArm64'.
    &gt; Process 'command '/Applications/Android 
    Studio.app/Contents/jre/jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
  
  * Try:
  Run with --info or --debug option to get more log output. Run with --scan to get full 
  insights.
  
  * Exception is:
  org.gradle.api.tasks.TaskExecutionException: Execution failed for task 
  ':shared:cinteropFRAMEWORK_IOSIosArm64'.
  </code></pre>