What should you do when you encounter this error? ...
# kotlin-native
The source code for the error message is the only hit I get from Google... Halp 😅
Some context
Copy code
kotlin {

    ios()

    targets.withType<KotlinNativeTarget> {
        compilations {
            getByName("main") {
                cinterops(Action {
                    create("Bugsnag") {
                        defFile("carthage/cinterop/Bugsnag.def")
                        includeDirs.allHeaders("carthage/Carthage/Build/iOS/Bugsnag.framework/Headers")
                    }
                })
            }
        }
        binaries.executable(listOf(buildType)) {
            baseName = "app"
        }
    }

}
message has been deleted
Bugsnag.def
Copy code
depends = Foundation
package = framework.Bugsnag
language = Objective-C
headers = Bugsnag.h

compilerOpts = -framework Bugsnag
linkerOpts = -framework Bugsnag
I’m trying to build an iOS app with a Carthage dependency (Cocoapods integration doesn’t work)
Now I’m wondering if I need cinterops here as I’m not using the dependency, but a KMP dependency uses it. I may just need linkerOpts
Not sure if that’s the same problem, to be fair. Can you share the error contents?
r
So this compiles
Copy code
kotlin {

    ios()

    targets.withType<KotlinNativeTarget> {
        binaries.executable(listOf(buildType)) {
            baseName = "app"
            linkerOpts("-Fcarthage/Carthage/Build/iOS")
            freeCompilerArgs += "-Xobjc-generics"
        }
    }

}
But at runtime it did not find the
framework.Bugsnag
. I added it in XCode’s to-be-embedded Frameworks and it seems to work, but now I’m on the next problem : I don’t see my Gradle dependencies in iosMain. I’ll make another post for this one