I've got an ios project hooked up and consuming my...
# multiplatform
a
I've got an ios project hooked up and consuming my kotlin native code (using the direct method, not cocoapods) but it looks like only some classes get gen'ed into the shared framework header. For instance
fun LifecycleRegistry(): LifecycleRegistry = LifecycleRegistryImpl()
isn't referenced anywhere in my own Kotlin code, so it doesnt appear to be present in the header file. If i add a public variable w\ that type to one of my classes, then it does appear in the header. Is there anyway to force it to add everything to the header regardless of if it is in a public interface somewhere?
aha, if anyone else comes across this, you can explicitly export librarys:
Copy code
ios {
        binaries {
            framework {
                baseName = "shared"
                transitiveExport = true
                export("com.arkivanov.decompose:decompose:0.6.0")
            }
        }
    }
p
I suggest to not do that. It will greatly increase your headers file size. Maybe that fun lives in another artifact than exported?
a
not do
transitiveExport
? Or not do the export for decompose?
a
It's advised to not use
transitiveExport
, just export the required deps explicitly.
👍 2
a
Was this not an issue with the cocoapods method? I don't see this in a lot of the samples
a
This is not an issue, this is how it works. You have to export things to iOS 😀 AFAIK the cocoapods integration got the exporting feature just recently.
a
Oh interesting, I don't quite understand why in the to-do app sample for example I don't see this explicit export of decompose
a
Ah damn so there is!
a
Of course, this is how it works.