JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
16.27k stars 1.18k forks source link

(question) is ios support planned? #1189

Closed RedStoneCats101 closed 3 years ago

RedStoneCats101 commented 3 years ago

I am new so am sorry if this is in the incorrect spot

One of the main advantages of Kotlin over Java is Kotlin Multiplatform and the ability to share common code for all targets (android, iOS, web, native and JVM ) now that compose-jb supports Web as well as JVM and native(i think) the only obvious thing missing is iOS

The Issue

It is now conceivable to to have a program that targets android, iOS, web and native and use compose-jb for all UI except iOS witch would need to use swiftUI so if compose-jb could be used instead of SwiftUI ( so that the same @Composable fun can display UI on iOS as well to avoid also having to learn SwiftUI to target iOS ​) this is a problem because as seen in this exaple

common.kt


@Composable
fun ui() {
   profileImage()
}

@Composable
expect fun profileImage()

jvm.kt

@Composable
 actual fun profileImage() {
     Image("path/to/image") 
}

but on iOS this will not work and will need to use SwiftUI (or other) so it is not possible to share the common navigation code, general UI layouts ect

iOS.kt (ideally this would be possible)

@Composable
 actual fun profileImage() {
     Image("iOS/path/to/image") 
}

Skia seems to support iOS (flutter appears to use Skia for something very similar and supports iOS) if it is pposable to port compose-jb to iOS how would this be achieved ?

Thanks this is a question and suggestion only

akurasov commented 3 years ago

Hi! Yes, we understand importance of this platform support and are investigating our options here.

RedStoneCats101 commented 3 years ago

Thank you

Ndrocchietto commented 3 years ago

community is preying

okushnikov commented 4 months ago

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.