Javokhir Savriev
09/14/2023, 1:06 PMPablichjenkov
09/14/2023, 1:20 PMJavokhir Savriev
09/14/2023, 1:30 PMPablichjenkov
09/14/2023, 2:12 PMPablichjenkov
09/14/2023, 2:13 PMJeff Lockhart
09/14/2023, 6:05 PMlanguage = Objective-C
modules = ModuleName
linkerOpts = -framework FrameworkName
Then configure the C interop for the compilation. Something like this:
targets.withType<KotlinNativeTarget>().configureEach {
if (konanTarget.family.isAppleFamily) {
val main by compilations.getting
main.cinterops.create("defFileName") {
includeDirs("path/to/framework/headers")
}
}
}
Jeff Lockhart
09/14/2023, 6:07 PMbinaries.framework {
val path = "$rootDir/path/to/framework/FrameworkName.xcframework/target-arch"
linkerOpts("-F$path", "-framework", "FrameworkName", "-rpath", path)
}
Pablichjenkov
09/14/2023, 6:09 PM