publishing (which works ✅*)*
It it still unsupported to build a
sharedLib
binary for iOS to provide public
@Composable
functions? 🤔
This would mean we can't have K Compose/iOS Component libraries - pretty vanilla requirement don't you think? 🤯
Whenever I try I get the dreaded
Compilation failed: No file for org.chrishatton.timeline.presentation.view/TimelineView|TimelineView(){}[0]
...I'm using Kotlin
2.0.0
with Compose Multiplatform
1.6.10
.
Tried a number of things including disabling cache, but no dice 🤷
i
Ivan Matkov
06/19/2024, 11:57 AM
Could you please clarify the use case? What do you want to achieve?
Composable functions aren't exposed to ObjC/Swift because you cannot (and shouldn't) call them outside of composable context
d
darkmoon_uk
06/19/2024, 12:02 PM
Oh! I just realised my misunderstanding. I was conflating
sharedLib
binary definition with being able to publish
klib
Maven artifact.
darkmoon_uk
06/19/2024, 12:03 PM
That's native
dylib
output I now realise;
binaries { sharedLib {} }
can be removed and I can still build & publish iOS Maven Artifacts.
o
Oleksandr Karpovich [JB]
06/19/2024, 12:04 PM
is TimelineView an expect/actual fun by chance?
d
darkmoon_uk
06/19/2024, 12:05 PM
No it is not `expect`ed in this case; and to rule out complexities I reduced it to only
@Composable fun TimelineView(): Unit {}
but still got the error with
binaries { sharedLib {} }
present.
darkmoon_uk
06/19/2024, 12:06 PM
I'm unblocked, but the
No File
error still strikes me as a rough edge; a nice warning like "Publishing public @Composable functions is unsupported for iOS native .dylib or .framework binaries" would be less confusing, if possible 🙂