Embedded SwiftUI view in Compose Multiplatform example
- Kotlin 77.9%
- Swift 19.8%
- HTML 1.8%
- CSS 0.5%
|
Ivan Schuetz
30f47e14e6
Use koin
Added <platform> suffix to Modules/Constants platform specific filenames because of this error when running the Android app: Duplicate JVM class name 'com/schuetz/di/ModulesKt' generated from: ModulesKt, ModulesKt Curiously, it didn't happen with Deps.kt (now removed) before |
||
|---|---|---|
| composeApp | Use koin | |
| gradle | Use koin | |
| img | Add readme | |
| iosApp | Use koin | |
| kotlin-js-store | Add (manual) dependency management | |
| server | Improve websocket name | |
| shared | Initial import | |
| .gitignore | Initial import | |
| build.gradle.kts | Initial import | |
| gradle.properties | Initial import | |
| gradlew | Initial import | |
| gradlew.bat | Initial import | |
| LICENSE | Add license | |
| README.md | Add readme | |
| settings.gradle.kts | Initial import | |
Embedded SwiftUI view in Compose Multiplatform example
This example shows a SceneKit 3d model in SwiftUI embedded in a Compose Multiplatform view, being rotated by websocket events.
In more detail:
- Websocket server sends random numbers to the client
- On iOS, the websocket numbers are used to animate the 3d model's rotation
- On other platforms, the view is a text label that displays the websocket numbers
I did this to explore embedding native iOS views in Compose Multiplatform, and bidirectional control flow.
Run:
Start the server
./gradlew :server:run
Then start any of the apps.