*Edit: Solved - My misunderstanding between `share...
# compose-ios
d
Edit: Solved - My misunderstanding between
sharedLib
and
klib
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
No file for
error (as discussed here two years ago), e.g:
Copy code
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
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
Oh! I just realised my misunderstanding. I was conflating
sharedLib
binary definition with being able to publish
klib
Maven artifact.
That's native
dylib
output I now realise;
binaries { sharedLib {} }
can be removed and I can still build & publish iOS Maven Artifacts.
o
is TimelineView an expect/actual fun by chance?
d
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.
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 🙂