GithubHelp home page GithubHelp logo

tlaster / precompose Goto Github PK

View Code? Open in Web Editor NEW
780.0 13.0 48.0 1.98 MB

Compose Multiplatform Navigation && State Management

Home Page: https://tlaster.github.io/PreCompose/

License: MIT License

Kotlin 100.00%
jetpack-compose kotlin kotlin-multiplatform compose-desktop compose-navigation compose-ios

precompose's Introduction

PreCompose

Maven Central compose-jb-version license

badge-Android badge-iOS badge-JVM badge-macOS badge-web

Compose Multiplatform Navigation && ViewModel, inspired by Jetpack Navigation, ViewModel and Lifecycle, PreCompose provides similar (or even the same) components for you but in Kotlin, and it's Kotlin Multiplatform project.

Why PreCompose

  • Write your business logic and UI code once in one commonMain, and your application can be anywhere, powered by Kotlin and Compose!
  • If you familiar with Jetpack Lifecycle, ViewModel and Navigation, there will be nothing to learn.
  • Super easy to set up.
  • No need to write platform-specific code and UI.
  • Lifecycle is handled by PreCompose, you don't need to worry about it.
  • With Molecule integration, you can easily write your business logic in Kotlin Multiplatform project.

Setup

Setup guide for PreCompose

Components

Sample

Credits

Thanks JetBrains for supporting open source software

JetBrains Logo (Main) logo.

LICENSE

MIT License

Copyright (c) 2021 Tlaster

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

precompose's People

Contributors

alexzhirkevich avatar andremion avatar dependabot[bot] avatar dsbezerra avatar hichamboushaba avatar hoangchungk53qx1 avatar joesteven avatar kkoshin avatar lavmee avatar martinbonnin avatar olayg avatar qdsfdhvh avatar sebastianaigner avatar sphrak avatar stylianosgakis avatar thennothinghappened avatar theronrogers avatar tiper avatar tlaster avatar zacharee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

precompose's Issues

Can't use with compose-multiplatform 1.5.0-beta01

When I use version 1.4.3 with compose-multiplatform 1.5.0-beta01, I get the error:
FATAL EXCEPTION: main Process: super.kmmapp.debug, PID: 2689 java.lang.NoSuchMethodError: No static method AnimatedContent(Ljava/lang/Object;Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function1;Landroidx/compose/ui/Alignment;Ljava/lang/String;Lkotlin/jvm/functions/Function4;Landroidx/compose/runtime/Composer;II)V in class Landroidx/compose/animation/AnimatedContentKt; or its super classes (declaration of 'androidx.compose.animation.AnimatedContentKt' appears in /data/app/~~qom9S0eNzgnq3MigV5v-2w==/super.kmmapp.debug-jmAIptZSvKgBufIuH3j_4w==/base.apk) at moe.tlaster.precompose.navigation.NavHostKt.NavHost(NavHost.kt:135) at moe.tlaster.precompose.navigation.NavHostKt$NavHost$5.invoke(Unknown Source:23) at moe.tlaster.precompose.navigation.NavHostKt$NavHost$5.invoke(Unknown Source:10) at androidx.compose.runtime.RecomposeScopeImpl.compose(RecomposeScopeImpl.kt:169) at androidx.compose.runtime.ComposerImpl.recomposeToGroupEnd(Composer.kt:2468) at androidx.compose.runtime.ComposerImpl.skipCurrentGroup(Composer.kt:2737) at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:3352) at androidx.compose.runtime.ComposerImpl.recompose$runtime_release(Composer.kt:3303) at androidx.compose.runtime.CompositionImpl.recompose(Composition.kt:781) at androidx.compose.runtime.Recomposer.performRecompose(Recomposer.kt:1097) at androidx.compose.runtime.Recomposer.access$performRecompose(Recomposer.kt:124) at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$1.invoke(Recomposer.kt:569) at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$1.invoke(Recomposer.kt:537) at androidx.compose.ui.platform.AndroidUiFrameClock$withFrameNanos$2$callback$1.doFrame(AndroidUiFrameClock.android.kt:41) at androidx.compose.ui.platform.AndroidUiDispatcher.performFrameDispatch(AndroidUiDispatcher.android.kt:109) at androidx.compose.ui.platform.AndroidUiDispatcher.access$performFrameDispatch(AndroidUiDispatcher.android.kt:41) at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.doFrame(AndroidUiDispatcher.android.kt:69) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1229) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1239) at android.view.Choreographer.doCallbacks(Choreographer.java:899) at android.view.Choreographer.doFrame(Choreographer.java:827) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1214) at android.os.Handler.handleCallback(Handler.java:942) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:201) at android.os.Looper.loop(Looper.java:288) at android.app.ActivityThread.main(ActivityThread.java:7872) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)

Wasm support

It'd be great to heave a wasm support. May be in a different experimental branch

The screen is recreated when navigating from the BottomBar

I have settings for my bottomBar like this:

@Composable
fun MainScene() {
    val navigator = rememberNavigator()
    val tabs = listOf(BottomNavItem.Home, BottomNavItem.Settings)
    val currentEntry = navigator.currentEntry.collectAsState(null)
    val currentRoute = currentEntry.value?.route?.route ?: ""

    Scaffold(
        bottomBar = {
            BottomAppBar {
                BottomNavigationItem(
                    icon = {},
                    label = { Text(BottomNavItem.Home.title) },
                    selected = currentRoute == BottomNavItem.Home.route,
                    onClick = {
                        if (currentRoute == BottomNavItem.Home.route) {
                            return@BottomNavigationItem
                        }
                        navigator.navigate(
                            BottomNavItem.Home.route,
                            NavOptions(
                                launchSingleTop = true
                            )
                        )
                    }
                )

                BottomNavigationItem(
                    icon = {},
                    label = { Text(BottomNavItem.Settings.title) },
                    selected = currentRoute == BottomNavItem.Settings.route,
                    onClick = {
                        if (currentRoute == BottomNavItem.Settings.route) {
                            return@BottomNavigationItem
                        }
                        navigator.navigate(
                            BottomNavItem.Settings.route,
                            NavOptions(
                                launchSingleTop = true
                            )
                        )
                    }
                )
            }
        }
    ) {
        NavHost(
            navigator = navigator,
            initialRoute = BottomNavItem.Home.route
        ) {
            scene(BottomNavItem.Home.route) {
                HomeScene()
            }

            scene(BottomNavItem.Settings.route) {
                SettingsScene()
            }
        }
    }
}

sealed class BottomNavItem(
    val route: String,
    val title: String
) {
    object Home : BottomNavItem(
        "/home",
        "Home"
    )

    object Settings : BottomNavItem(
        "/settings",
        "Settings"
    )
}

Also I have changeable HomeScreen:

@Composable
fun HomeScene(
    navigator: Navigator
) {
    val value = remember { mutableStateOf(1) }
    val coroutineScope = rememberCoroutineScope()

    LaunchedEffect(Unit) {
        coroutineScope.launch {
            delay(1000)
            value.value = 1000
        }
    }

    Box(
        modifier = Modifier
            .fillMaxSize()
            .background(Color.Blue),
        contentAlignment = Alignment.Center
    ) {
        Text(
            text = value.value.toString(),
        )
    }
}

Every time I switch between screens using my BottomBar, the HomeScreen state resets and the LaunchEffect starts again.
Is there a bug or my mistake with settings?

ViewModel always creating a new one

An example of use when the viewModel is re-created, since the owner of the BackStackEntry always changes. so never works ViewModelStoreOwner.getViewModel

NavHost(
        navigator = navigator, initialRoute = startDestination, modifier = modifier
    ) {
        scene(HOME_ROUTE) {    <- there is always a new viewModelStoreOwner
            val viewModel = viewModel(HomeViewModel::class) {
                HomeViewModel(appContainer)
            }
            HomeView(viewModel)
        }
    }

problem with jvm version

Hi,
When I use val phone = backStackEntry.path<String>("phone") in the scene, it shows me the following error for the path function:
Cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify the proper '-jvm-target' option.
This error only occurs when I use it in the common module.

initialRoute doesn't work when it has parameters

When defining a NavHost, if we supply the initialRoute with some parameters, the app crashes with the error: No initial route target fot this route graph, and the cause is this line which compares the initial route to the routes templates:

require(route.any { it.route == initialRoute }) {
"No initial route target fot this route graph"
}

I wanted to fix this with the PR #62, but I'm not sure what's the best approach to take here, using the RouteParser for the validation seems like an overkill, and IMO the check is not important, since the app would crash in all cases if the initialRoute doesn't match another route, so probably it can simply be removed completely, WDYT?

Build failed on iOS

I had a problem when I tried to add precompose-viewmodel to my project which using Kotlin 1.8.20.

 val commonMain by getting {
     dependencies {
          api("moe.tlaster:precompose:1.4.2")
          api("moe.tlaster:precompose-viewmodel:1.4.2")
    }
error: Module "moe.tlaster:precompose-viewmodel (moe.tlaster:precompose-viewmodel-iossimulatorarm64)" has a reference to symbol [ moe.tlaster.precompose.viewmodel/viewModel|-270356911908209679[0] <- local Local[<TP>,0 | TYPE_PARAMETER name:T index:0 variance: superTypes:[moe.tlaster.precompose.viewmodel.ViewModel] reified:true] ]. Neither the module itself nor its dependencies contain such declaration.

This could happen if the required dependency is missing in the project. Or if there is a dependency of "moe.tlaster:precompose-viewmodel (moe.tlaster:precompose-viewmodel-iossimulatorarm64)" that has a different version in the project than the version that "moe.tlaster:precompose-viewmodel (moe.tlaster:precompose-viewmodel-iossimulatorarm64): 1.4.2" was initially compiled with. Please check that the project configuration is correct and has consistent versions of all required dependencies.

...
+--- moe.tlaster:precompose-viewmodel (moe.tlaster:precompose-viewmodel-iossimulatorarm64): 1.4.2
|    ^^^ This module requires symbol [ moe.tlaster.precompose.viewmodel/viewModel|-270356911908209679[0] <- local Local[<TP>,0 | TYPE_PARAMETER name:T index:0 variance: superTypes:[moe.tlaster.precompose.viewmodel.ViewModel] reified:true] ].
...

Dialog Scene

Hi
Is it possible to add dialog scene?
It means that it should be exactly the same as the scene, but it should be displayed like a dialog.
For Example you can use popup for compose multiplatform instead of AlertDialog.

@composable
fun Dialog(
barrierColor: Color = Color.Black.copy(alpha = 0.5f),
onDismissRequest: (() -> Unit),
content: @composable () -> Unit
) {
MyBackHandler {
onDismissRequest()
}
Popup(onDismissRequest = onDismissRequest) {
Box(
modifier = Modifier
.clickable(
onClick = { onDismissRequest() },
indication = null,
interactionSource = remember { MutableInteractionSource() }
)
.background(barrierColor).fillMaxSize(),
contentAlignment = Alignment.Center
) {
content()
}
}
}

iosApp build problem

I keep getting:

Cannot access 'kotlin.AutoCloseable' which is a supertype of 'com.triple.pokemon.presentation.overview.PokemonOverviewViewModel'. Check your module classpath for missing or conflicting dependencies

When make a simple ViewModel, what is going wrong?
I'm using version 1.4.2 with compose multiplatform 1.4.0

How can i use navigation like vue router?

As the title says. I have two top level screen, and multiple sub screen under one screen.

such like this graph

            one                                  two
      /       |       \                    /      |        \
     one     two    three                one     two      three

How can i achieve it?

"Module with the Main dispatcher is missing" exception on Desktop build when using viewModelScope

Hello!

This is working fine on Android, but I've noticed that if I compile my app for Desktop, the following call inside a ViewModel:

viewModelScope.launch {
   _images.value = items
}

Will trigger the exception:

java.lang.IllegalStateException: Module with the Main dispatcher is missing. Add dependency providing the Main dispatcher, e.g. 'kotlinx-coroutines-android'

I've managed to fix the issue by updating the build.gradle.kts file to:

val jvmMain by getting {
  dependencies {
    dependsOn(commonMain)

    implementation("org.jetbrains.kotlinx:kotlinx-coroutines-swing:1.6.1")
  }
}

Scene group or netsed navigation

In jetpack compose we have navigation in NavHost
Witch make a group of screens with a route address
Like the following code:

@Composable
fun CuteDogPicturesApp() {
	val navController = rememberNavController()
	NavHost(navController, startDestination = Screen.Feed) {
		composable(route = Screen.Feed) {
			FeedScreen(
				showAdoptionPage = { dogId ->
					navController.navigate(Screen.Adopt.createRoute(dogId))
				}
			)
		}
		navigation(route = Screen.Dog, startDestination = DogScreen.Adopt) {
		    composable(route = DogScreen.Adopt) { backStackEntry ->
			val dogId = backStackEntry.arguments?.getString("dogId")
			requireNotNull(dogId) { "dogId parameter wasn't found. Please make sure it's set!" }
			AdoptionScreen(
				dogId,
				navigateUp = { navController.popBackStack(DogScreen.Adopt, inclusive = true) }
			)
		    }
		    composable(route = DogScreen.ContactDetails) { backStackEntry ->
			val dogId = backStackEntry.arguments?.getString("dogId")
			requireNotNull(dogId) { "dogId parameter wasn't found. Please make sure it's set!" }
			AdoptionContactDetailsScreen(dogId)
		    }
		}
		// imagine 30 more of these in here!
	}
}

Can i create it with precompose?

ViewModel, Navigation and Koin

Hi,
Is it possible to scope a ViewModel to Navigation destinations and use Koin for Dependency Injection? How would I achieve that?

关于 State Action 模式中 TextField 的光标位置问题

使用 Molecule + State Action 一起工作时,TextField 输入文字后,光标的位置不在文本的末尾,通常在倒数第二个字符后(快速输入时会有偏差)

@Composable
fun InputSample() {
    val state by producePresenter { InputPresenter() }
    Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.Center) {
        TextField(
            value = state.value,
            onValueChange = { state.emitter.invoke(InputAction.Input(it)) },
        )
    }
}

@Composable
fun InputPresenter(): InputState {
    var value by remember { mutableStateOf("") }
    return InputState(value = value) {
        when (it) {
            is InputAction.Input -> value = it.text
        }
    }
}

data class InputState(
    val value: String = "",
    val emitter: (InputAction) -> Unit,
)

sealed interface InputAction {
    data class Input(val text: String) : InputAction
}

参数从 String 换成 TextFieldValue 时正常

Unable to compile JVM app with the new libraries 1.x.x

Hello!

It's great to see the new updates in PreCompose - thank you! 🙂

I'm trying to test the new updates, but when I try to run the desktop app I'm getting:

Error: LinkageError occurred while loading main class MainKt
        java.lang.UnsupportedClassVersionError: MainKt has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0

I'm able to replicate this error in the sample project, by using the remote version of PreCompose, instead of the local one.

Briefly, on sample/desktop/build.gradle.kts file, I've changed the implementation to:

implementation("moe.tlaster:precompose:1.1.4")

I also tried the different versions that you've released starting with 1.0.0.

I tested different Java versions, from older to newer and the only thing that changed was the 55.0 number, which was continuously updated to the one that I was using.

Any idea, on what might be wrong?

How to support iosSimulatorArm64?

My build.gradle.kts

plugins {
    kotlin("multiplatform")
    kotlin("native.cocoapods")
    id("org.jetbrains.compose")
}

kotlin {
    android()
    iosX64("uikitX64")
    iosArm64("uikitArm64")
    iosSimulatorArm64("uikitSimArm64")

    sourceSets {
        val commonMain by getting {
            dependencies {
                implementation(compose.ui)
                implementation(compose.foundation)
                implementation(compose.material)
                implementation(compose.runtime)
                implementation(libs.precompose)
            }
        }
    }
}

Build logs

A problem occurred configuring project ':demo'.
> Could not resolve all dependencies for configuration ':demo:uikitSimArm64CompileKlibraries'.

App Crash on Long NavTransition

When nav transition's duration lasts too long and during transition i try to navigate one more time to same destination, i get crush:

java.lang.IllegalArgumentException: Key 1-Login was used multiple times 
    at androidx.compose.runtime.saveable.SaveableStateHolderImpl$SaveableStateProvider$1$1.invoke(SaveableStateHolder.kt:89)
    at androidx.compose.runtime.saveable.SaveableStateHolderImpl$SaveableStateProvider$1$1.invoke(SaveableStateHolder.kt:88)
    at androidx.compose.runtime.DisposableEffectImpl.onRemembered(Effects.kt:81)
    at androidx.compose.runtime.CompositionImpl$RememberEventDispatcher.dispatchRememberObservers(Composition.kt:1105)
    at androidx.compose.runtime.CompositionImpl.applyChangesInLocked(Composition.kt:820)
    at androidx.compose.runtime.CompositionImpl.applyChanges(Composition.kt:842)
    at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$2.invoke(Recomposer.kt:592)
    at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$2.invoke(Recomposer.kt:510)
    at androidx.compose.ui.platform.AndroidUiFrameClock$withFrameNanos$2$callback$1.doFrame(AndroidUiFrameClock.android.kt:34)
    at androidx.compose.ui.platform.AndroidUiDispatcher.performFrameDispatch(AndroidUiDispatcher.android.kt:109)
    at androidx.compose.ui.platform.AndroidUiDispatcher.access$performFrameDispatch(AndroidUiDispatcher.android.kt:41)
    at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.doFrame(AndroidUiDispatcher.android.kt:69)
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1229)
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1239)
    at android.view.Choreographer.doCallbacks(Choreographer.java:899)
    at android.view.Choreographer.doFrame(Choreographer.java:827)
    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1214)
    at android.os.Handler.handleCallback(Handler.java:942)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loopOnce(Looper.java:201)
    at android.os.Looper.loop(Looper.java:288)
    at android.app.ActivityThread.main(ActivityThread.java:7884)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
    Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [androidx.compose.runtime.PausableMonotonicFrameClock@d547794, androidx.compose.ui.platform.MotionDurationScaleImpl@9de323d, StandaloneCoroutine{Cancelling}@f182a32, AndroidUiDispatcher@ed16383]

`exitTargetContentZIndex` works correctly only with 1st backstack entry

Screen.Recording.2023-04-26.at.13.05.16.mov
NavHost(
    navigator = navigator,
    initialRoute = "1",
    navTransition = NavTransition(
        createTransition = slideInHorizontally { it },
        destroyTransition = slideOutHorizontally { it },
        pauseTransition = slideOutHorizontally { -it / 4 },
        resumeTransition = slideInHorizontally { -it / 4 },
        exitTargetContentZIndex = 1f
    )
) {

    scene("1") {
        Box(Modifier.fillMaxSize().background(Color.Red)) {

            Button(modifier = Modifier.align(Alignment.Center),
                onClick = { navigator.navigate("2") }) {
                Text("To 2")
            }
        }
    }

    scene("2") {
        Box(Modifier.fillMaxSize().background(Color.Green)) {
            Column(modifier = Modifier.align(Alignment.Center)) {
                Button(onClick = { navigator.navigate("3") }) {
                    Text("To 3")
                }
                Button(onClick = { navigator.goBack() }) {
                    Text("Back")
                }
            }
        }
    }

    scene("3") {
        Box(Modifier.fillMaxSize().background(Color.Blue)) {
            Button(modifier = Modifier.align(Alignment.Center),
                onClick = { navigator.goBack() }) {
                Text("Back")
            }
        }
    }
}

Exception in thread "main" java.lang.NoSuchMethodError: 'boolean androidx.compose.runtime.Composer.changedInstance(java.lang.Object)'

1.4.1 version

version error?

Exception in thread "main" java.lang.NoSuchMethodError: 'boolean androidx.compose.runtime.Composer.changedInstance(java.lang.Object)' at moe.tlaster.precompose.PreComposeWindowKt.PreComposeWindow(PreComposeWindow.kt:41) at main.ComposableSingletons$MainKt$lambda-3$1.invoke(Main.kt:52) at main.ComposableSingletons$MainKt$lambda-3$1.invoke(Main.kt:49) at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:116) at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34) at androidx.compose.ui.window.Application_desktopKt$application$1$1.invoke(Application.desktop.kt:115) at androidx.compose.ui.window.Application_desktopKt$application$1$1.invoke(Application.desktop.kt:114) at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:116) at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34) at androidx.compose.ui.window.Application_desktopKt$awaitApplication$2$1$2$1$1.invoke(Application.desktop.kt:226) at androidx.compose.ui.window.Application_desktopKt$awaitApplication$2$1$2$1$1.invoke(Application.desktop.kt:225) at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107) at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34) at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228) at androidx.compose.ui.window.Application_desktopKt$awaitApplication$2$1$2$1.invoke(Application.desktop.kt:221) at androidx.compose.ui.window.Application_desktopKt$awaitApplication$2$1$2$1.invoke(Application.desktop.kt:219) at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107) at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34) at androidx.compose.runtime.ActualJvm_jvmKt.invokeComposable(ActualJvm.jvm.kt:73) at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:3248) at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:3238) at androidx.compose.runtime.SnapshotStateKt__DerivedStateKt.observeDerivedStateRecalculations(DerivedState.kt:341) at androidx.compose.runtime.SnapshotStateKt.observeDerivedStateRecalculations(Unknown Source) at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:3238) at androidx.compose.runtime.ComposerImpl.composeContent$runtime(Composer.kt:3173) at androidx.compose.runtime.CompositionImpl.composeContent(Composition.kt:587) at androidx.compose.runtime.Recomposer.composeInitial$runtime(Recomposer.kt:950) at androidx.compose.runtime.CompositionImpl.setContent(Composition.kt:519) at androidx.compose.ui.window.Application_desktopKt$awaitApplication$2$1$2.invokeSuspend(Application.desktop.kt:219) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:316) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715) at java.base/java.security.AccessController.doPrivileged(AccessController.java:391) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Module "moe.tlaster:precompose (moe.tlaster:precompose-uikitsimulatorarm64)" has a reference to symbol

> Task :shared:linkPodDebugFrameworkIosApp FAILED
e: Module "moe.tlaster:precompose (moe.tlaster:precompose-uikitsimulatorarm64)" has a reference to symbol [ moe.tlaster.precompose.ui/viewModel|-270356911908209679[0] <- local Local[<TP>,0 | TYPE_PARAMETER name:T index:0 variance: superTypes:[moe.tlaster.precompose.viewmodel.ViewModel] reified:true] ]. Neither the module itself nor its dependencies contain such declaration.

This could happen if the required dependency is missing in the project. Or if there is a dependency of "moe.tlaster:precompose (moe.tlaster:precompose-uikitsimulatorarm64)" that has a different version in the project than the version that "moe.tlaster:precompose (moe.tlaster:precompose-uikitsimulatorarm64): 1.3.14" was initially compiled with. Please check that the project configuration is correct and has consistent versions of all required dependencies.

The list of "moe.tlaster:precompose (moe.tlaster:precompose-uikitsimulatorarm64): 1.3.14" dependencies that may lead to conflicts:
 1. "org.jetbrains.compose.animation:animation (org.jetbrains.compose.animation:animation-uikitsimarm64): 1.3.0" (was initially compiled with "org.jetbrains.compose.animation:animation (org.jetbrains.compose.animation:animation-uikitsimarm64)")
 2. "org.jetbrains.compose.animation:animation-core (org.jetbrains.compose.animation:animation-core-uikitsimarm64): 1.3.0" (was initially compiled with "org.jetbrains.compose.animation:animation-core (org.jetbrains.compose.animation:animation-core-uikitsimarm64)")
 3. "org.jetbrains.compose.foundation:foundation (org.jetbrains.compose.foundation:foundation-uikitsimarm64): 1.3.0" (was initially compiled with "org.jetbrains.compose.foundation:foundation (org.jetbrains.compose.foundation:foundation-uikitsimarm64)")
 4. "org.jetbrains.compose.foundation:foundation-layout (org.jetbrains.compose.foundation:foundation-layout-uikitsimarm64): 1.3.0" (was initially compiled with "org.jetbrains.compose.foundation:foundation-layout (org.jetbrains.compose.foundation:foundation-layout-uikitsimarm64)")
 5. "org.jetbrains.compose.runtime:runtime (org.jetbrains.compose.runtime:runtime-uikitsimarm64): 1.3.0" (was initially compiled with "org.jetbrains.compose.runtime:runtime (org.jetbrains.compose.runtime:runtime-uikitsimarm64)")
 6. "org.jetbrains.compose.runtime:runtime-saveable (org.jetbrains.compose.runtime:runtime-saveable-uikitsimarm64): 1.3.0" (was initially compiled with "org.jetbrains.compose.runtime:runtime-saveable (org.jetbrains.compose.runtime:runtime-saveable-uikitsimarm64)")
 7. "org.jetbrains.compose.ui:ui (org.jetbrains.compose.ui:ui-uikitsimarm64): 1.3.0" (was initially compiled with "org.jetbrains.compose.ui:ui (org.jetbrains.compose.ui:ui-uikitsimarm64)")
 8. "org.jetbrains.compose.ui:ui-geometry (org.jetbrains.compose.ui:ui-geometry-uikitsimarm64): 1.3.0" (was initially compiled with "org.jetbrains.compose.ui:ui-geometry (org.jetbrains.compose.ui:ui-geometry-uikitsimarm64)")
 9. "org.jetbrains.compose.ui:ui-graphics (org.jetbrains.compose.ui:ui-graphics-uikitsimarm64): 1.3.0" (was initially compiled with "org.jetbrains.compose.ui:ui-graphics (org.jetbrains.compose.ui:ui-graphics-uikitsimarm64)")
10. "org.jetbrains.compose.ui:ui-text (org.jetbrains.compose.ui:ui-text-uikitsimarm64): 1.3.0" (was initially compiled with "org.jetbrains.compose.ui:ui-text (org.jetbrains.compose.ui:ui-text-uikitsimarm64)")
11. "org.jetbrains.compose.ui:ui-unit (org.jetbrains.compose.ui:ui-unit-uikitsimarm64): 1.3.0" (was initially compiled with "org.jetbrains.compose.ui:ui-unit (org.jetbrains.compose.ui:ui-unit-uikitsimarm64)")
12. "org.jetbrains.compose.ui:ui-util (org.jetbrains.compose.ui:ui-util-uikitsimarm64): 1.3.0" (was initially compiled with "org.jetbrains.compose.ui:ui-util (org.jetbrains.compose.ui:ui-util-uikitsimarm64)")
13. "org.jetbrains.skiko:skiko (org.jetbrains.skiko:skiko-iossimulatorarm64): 0.7.50" (was initially compiled with "org.jetbrains.skiko:skiko (org.jetbrains.skiko:skiko-iossimulatorarm64)")
14. "org.jetbrains:annotations: 13.0" (a dependency of the library with unknown version or versions mismatch: "org.jetbrains:annotations")
15. "stdlib: 1.8.0" (was initially compiled with "stdlib: 1.6.20")
16. "org.jetbrains.kotlin.native.platform.CommonCrypto: 1.8.0" (was initially compiled with "org.jetbrains.kotlin.native.platform.CommonCrypto: 1.7.20")
17. "org.jetbrains.kotlin.native.platform.CoreFoundation: 1.8.0" (was initially compiled with "org.jetbrains.kotlin.native.platform.CoreFoundation: 1.6.21")
18. "org.jetbrains.kotlin.native.platform.darwin: 1.8.0" (was initially compiled with "org.jetbrains.kotlin.native.platform.darwin: 1.6.21")
19. "org.jetbrains.kotlin.native.platform.posix: 1.8.0" (was initially compiled with "org.jetbrains.kotlin.native.platform.posix: 1.6.20")
20. "org.jetbrains.kotlin:kotlin-stdlib: 1.8.0" (a dependency of the library with unknown version or versions mismatch: "org.jetbrains.kotlin:kotlin-stdlib")
21. "org.jetbrains.kotlinx:atomicfu (org.jetbrains.kotlinx:atomicfu-iossimulatorarm64): 0.17.3" (was initially compiled with "org.jetbrains.kotlinx:atomicfu (org.jetbrains.kotlinx:atomicfu-iossimulatorarm64)")

Project dependencies:
+--- io.ktor:ktor-client-content-negotiation (io.ktor:ktor-client-content-negotiation-iossimulatorarm64): 2.1.2
|    +--- io.ktor:ktor-client-core (io.ktor:ktor-client-core-iossimulatorarm64): 2.1.2
|    |    +--- io.ktor:ktor-events (io.ktor:ktor-events-iossimulatorarm64): 2.1.2
|    |    |    +--- io.ktor:ktor-http (io.ktor:ktor-http-iossimulatorarm64): 2.1.2
|    |    |    |    +--- io.ktor:ktor-io (io.ktor:ktor-io-iossimulatorarm64): unknown -> 2.1.2
|    |    |    |    |    +--- stdlib: 1.6.21 -> 1.8.0
|    |    |    |    |    +--- org.jetbrains.kotlin.native.platform.CoreFoundation: 1.6.21 -> 1.8.0
|    |    |    |    |    |    +--- stdlib: 1.8.0
|    |    |    |    |    |    +--- org.jetbrains.kotlin.native.platform.CoreFoundationBase: 1.8.0
|    |    |    |    |    |    |    \--- stdlib: 1.8.0
|    |    |    |    |    |    +--- org.jetbrains.kotlin.native.platform.darwin: 1.8.0
|    |    |    |    |    |    |    +--- stdlib: 1.8.0
|    |    |    |    |    |    |    \--- org.jetbrains.kotlin.native.platform.posix: 1.8.0
|    |    |    |    |    |    |         \--- stdlib: 1.8.0
|    |    |    |    |    |    \--- org.jetbrains.kotlin.native.platform.posix: 1.8.0 (*)
|    |    |    |    |    +--- org.jetbrains.kotlin.native.platform.darwin: 1.6.21 -> 1.8.0 (*)
|    |    |    |    |    +--- org.jetbrains.kotlin.native.platform.iconv: 1.6.21 -> 1.8.0
|    |    |    |    |    |    +--- stdlib: 1.8.0
|    |    |    |    |    |    \--- org.jetbrains.kotlin.native.platform.posix: 1.8.0 (*)
|    |    |    |    |    +--- org.jetbrains.kotlin.native.platform.posix: 1.6.21 -> 1.8.0 (*)
|    |    |    |    |    +--- org.jetbrains.kotlinx:atomicfu (org.jetbrains.kotlinx:atomicfu-iossimulatorarm64): 0.17.3
|    |    |    |    |    |    +--- stdlib: 1.6.20 -> 1.8.0
|    |    |    |    |    |    +--- org.jetbrains.kotlin.native.platform.posix: 1.6.20 -> 1.8.0 (*)
|    |    |    |    |    |    \--- org.jetbrains.kotlinx:atomicfu-cinterop-interop: 0.17.3
|    |    |    |    |    |         +--- stdlib: 1.6.20 -> 1.8.0
|    |    |    |    |    |         \--- org.jetbrains.kotlin.native.platform.posix: 1.6.20 -> 1.8.0 (*)
|    |    |    |    |    +--- org.jetbrains.kotlinx:atomicfu-cinterop-interop: 0.17.3 (*)
|    |    |    |    |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-core (org.jetbrains.kotlinx:kotlinx-coroutines-core-iossimulatorarm64): 1.6.4
|    |    |    |    |         +--- stdlib: 1.6.21 -> 1.8.0
|    |    |    |    |         +--- org.jetbrains.kotlin.native.platform.CoreFoundation: 1.6.21 -> 1.8.0 (*)
|    |    |    |    |         +--- org.jetbrains.kotlin.native.platform.darwin: 1.6.21 -> 1.8.0 (*)
|    |    |    |    |         +--- org.jetbrains.kotlin.native.platform.posix: 1.6.21 -> 1.8.0 (*)
|    |    |    |    |         +--- org.jetbrains.kotlinx:atomicfu (org.jetbrains.kotlinx:atomicfu-iossimulatorarm64): 0.17.3 (*)
|    |    |    |    |         \--- org.jetbrains.kotlinx:atomicfu-cinterop-interop: 0.17.3 (*)
|    |    |    |    +--- io.ktor:ktor-utils (io.ktor:ktor-utils-iossimulatorarm64): 2.1.2
|    |    |    |    |    +--- io.ktor:ktor-io (io.ktor:ktor-io-iossimulatorarm64): 2.1.2 (*)
|    |    |    |    |    +--- io.ktor:ktor-utils-cinterop-threadUtils: 2.1.2
|    |    |    |    |    |    +--- stdlib: 1.6.21 -> 1.8.0
|    |    |    |    |    |    \--- org.jetbrains.kotlin.native.platform.posix: 1.6.21 -> 1.8.0 (*)
|    |    |    |    |    +--- stdlib: 1.6.21 -> 1.8.0
|    |    |    |    |    +--- org.jetbrains.kotlin.native.platform.CoreFoundation: 1.6.21 -> 1.8.0 (*)
|    |    |    |    |    +--- org.jetbrains.kotlin.native.platform.darwin: 1.6.21 -> 1.8.0 (*)
|    |    |    |    |    +--- org.jetbrains.kotlin.native.platform.iconv: 1.6.21 -> 1.8.0 (*)
|    |    |    |    |    +--- org.jetbrains.kotlin.native.platform.posix: 1.6.21 -> 1.8.0 (*)
|    |    |    |    |    +--- org.jetbrains.kotlinx:atomicfu (org.jetbrains.kotlinx:atomicfu-iossimulatorarm64): 0.17.3 (*)
|    |    |    |    |    +--- org.jetbrains.kotlinx:atomicfu-cinterop-interop: 0.17.3 (*)
|    |    |    |    |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-core (org.jetbrains.kotlinx:kotlinx-coroutines-core-iossimulatorarm64): 1.6.4 (*)
|    |    |    |    +--- io.ktor:ktor-utils-cinterop-threadUtils: 2.1.2 (*)
|    |    |    |    +--- stdlib: 1.6.21 -> 1.8.0
|    |    |    |    +--- org.jetbrains.kotlin.native.platform.CoreFoundation: 1.6.21 -> 1.8.0 (*)
|    |    |    |    +--- org.jetbrains.kotlin.native.platform.darwin: 1.6.21 -> 1.8.0 (*)
|    |    |    |    +--- org.jetbrains.kotlin.native.platform.iconv: 1.6.21 -> 1.8.0 (*)
|    |    |    |    +--- org.jetbrains.kotlin.native.platform.posix: 1.6.21 -> 1.8.0 (*)
|    |    |    |    +--- org.jetbrains.kotlinx:atomicfu (org.jetbrains.kotlinx:atomicfu-iossimulatorarm64): 0.17.3 (*)
|    |    |    |    +--- org.jetbrains.kotlinx:atomicfu-cinterop-interop: 0.17.3 (*)
|    |    |    |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-core (org.jetbrains.kotlinx:kotlinx-coroutines-core-iossimulatorarm64): 1.6.4 (*)
|    |    |    +--- io.ktor:ktor-io (io.ktor:ktor-io-iossimulatorarm64): unknown -> 2.1.2 (*)
|    |    |    +--- io.ktor:ktor-utils (io.ktor:ktor-utils-iossimulatorarm64): 2.1.2 (*)
|    |    |    +--- io.ktor:ktor-utils-cinterop-threadUtils: 2.1.2 (*)
|    |    |    +--- stdlib: 1.6.21 -> 1.8.0
|    |    |    +--- org.jetbrains.kotlin.native.platform.CoreFoundation: 1.6.21 -> 1.8.0 (*)
|    |    |    +--- org.jetbrains.kotlin.native.platform.darwin: 1.6.21 -> 1.8.0 (*)
|    |    |    +--- org.jetbrains.kotlin.native.platform.iconv: 1.6.21 -> 1.8.0 (*)
|    |    |    +--- org.jetbrains.kotlin.native.platform.posix: 1.6.21 -> 1.8.0 (*)
|    |    |    +--- org.jetbrains.kotlinx:atomicfu (org.jetbrains.kotlinx:atomicfu-iossimulatorarm64): 0.17.3 (*)
|    |    |    +--- org.jetbrains.kotlinx:atomicfu-cinterop-interop: 0.17.3 (*)
|    |    |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-core (org.jetbrains.kotlinx:kotlinx-coroutines-core-iossimulatorarm64): 1.6.4 (*)
|    |    +--- io.ktor:ktor-http (io.ktor:ktor-http-iossimulatorarm64): 2.1.2 (*)
|    |    +--- io.ktor:ktor-io (io.ktor:ktor-io-iossimulatorarm64): unknown -> 2.1.2 (*)
|    |    +--- io.ktor:ktor-serialization (io.ktor:ktor-serialization-iossimulatorarm64): unknown -> 2.1.2
|    |    |    +--- io.ktor:ktor-http (io.ktor:ktor-http-iossimulatorarm64): 2.1.2 (*)
|    |    |    +--- io.ktor:ktor-io (io.ktor:ktor-io-iossimulatorarm64): unknown -> 2.1.2 (*)
|    |    |    +--- io.ktor:ktor-utils (io.ktor:ktor-utils-iossimulatorarm64): unknown -> 2.1.2 (*)
|    |    |    +--- io.ktor:ktor-utils-cinterop-threadUtils: 2.1.2 (*)
|    |    |    +--- io.ktor:ktor-websockets (io.ktor:ktor-websockets-iossimulatorarm64): 2.1.2
|    |    |    |    +--- io.ktor:ktor-http (io.ktor:ktor-http-iossimulatorarm64): 2.1.2 (*)
|    |    |    |    +--- io.ktor:ktor-io (io.ktor:ktor-io-iossimulatorarm64): unknown -> 2.1.2 (*)
|    |    |    |    +--- io.ktor:ktor-utils (io.ktor:ktor-utils-iossimulatorarm64): unknown -> 2.1.2 (*)
|    |    |    |    +--- io.ktor:ktor-utils-cinterop-threadUtils: 2.1.2 (*)
|    |    |    |    +--- stdlib: 1.6.21 -> 1.8.0
|    |    |    |    +--- org.jetbrains.kotlin.native.platform.CoreFoundation: 1.6.21 -> 1.8.0 (*)
|    |    |    |    +--- org.jetbrains.kotlin.native.platform.darwin: 1.6.21 -> 1.8.0 (*)
|    |    |    |    +--- org.jetbrains.kotlin.native.platform.iconv: 1.6.21 -> 1.8.0 (*)
|    |    |    |    +--- org.jetbrains.kotlin.native.platform.posix: 1.6.21 -> 1.8.0 (*)
|    |    |    |    +--- org.jetbrains.kotlinx:atomicfu (org.jetbrains.kotlinx:atomicfu-iossimulatorarm64): 0.17.3 (*)
|    |    |    |    +--- org.jetbrains.kotlinx:atomicfu-cinterop-interop: 0.17.3 (*)
|    |    |    |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-core (org.jetbrains.kotlinx:kotlinx-coroutines-core-iossimulatorarm64): 1.6.4 (*)
|    |    |    +--- stdlib: 1.6.21 -> 1.8.0
|    |    |    +--- org.jetbrains.kotlin.native.platform.CoreFoundation: 1.6.21 -> 1.8.0 (*)
|    |    |    +--- org.jetbrains.kotlin.native.platform.darwin: 1.6.21 -> 1.8.0 (*)
|    |    |    +--- org.jetbrains.kotlin.native.platform.iconv: 1.6.21 -> 1.8.0 (*)
|    |    |    +--- org.jetbrains.kotlin.native.platform.posix: 1.6.21 -> 1.8.0 (*)
|    |    |    +--- org.jetbrains.kotlinx:atomicfu (org.jetbrains.kotlinx:atomicfu-iossimulatorarm64): 0.17.3 (*)
|    |    |    +--- org.jetbrains.kotlinx:atomicfu-cinterop-interop: 0.17.3 (*)
|    |    |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-core (org.jetbrains.kotlinx:kotlinx-coroutines-core-iossimulatorarm64): 1.6.4 (*)
|    |    +--- io.ktor:ktor-utils (io.ktor:ktor-utils-iossimulatorarm64): unknown -> 2.1.2 (*)
|    |    +--- io.ktor:ktor-utils-cinterop-threadUtils: 2.1.2 (*)
|    |    +--- io.ktor:ktor-websocket-serialization (io.ktor:ktor-websocket-serialization-iossimulatorarm64): 2.1.2
|    |    |    +--- io.ktor:ktor-http (io.ktor:ktor-http-iossimulatorarm64): 2.1.2 (*)
|    |    |    +--- io.ktor:ktor-io (io.ktor:ktor-io-iossimulatorarm64): unknown -> 2.1.2 (*)
|    |    |    +--- io.ktor:ktor-serialization (io.ktor:ktor-serialization-iossimulatorarm64): 2.1.2 (*)
|    |    |    +--- io.ktor:ktor-utils (io.ktor:ktor-utils-iossimulatorarm64): unknown -> 2.1.2 (*)
|    |    |    +--- io.ktor:ktor-utils-cinterop-threadUtils: 2.1.2 (*)
|    |    |    +--- io.ktor:ktor-websockets (io.ktor:ktor-websockets-iossimulatorarm64): unknown -> 2.1.2 (*)
|    |    |    +--- stdlib: 1.6.21 -> 1.8.0
|    |    |    +--- org.jetbrains.kotlin.native.platform.CoreFoundation: 1.6.21 -> 1.8.0 (*)
|    |    |    +--- org.jetbrains.kotlin.native.platform.darwin: 1.6.21 -> 1.8.0 (*)
|    |    |    +--- org.jetbrains.kotlin.native.platform.iconv: 1.6.21 -> 1.8.0 (*)
|    |    |    +--- org.jetbrains.kotlin.native.platform.posix: 1.6.21 -> 1.8.0 (*)
|    |    |    +--- org.jetbrains.kotlinx:atomicfu (org.jetbrains.kotlinx:atomicfu-iossimulatorarm64): 0.17.3 (*)
|    |    |    +--- org.jetbrains.kotlinx:atomicfu-cinterop-interop: 0.17.3 (*)
|    |    |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-core (org.jetbrains.kotlinx:kotlinx-coroutines-core-iossimulatorarm64): 1.6.4 (*)
|    |    +--- io.ktor:ktor-websockets (io.ktor:ktor-websockets-iossimulatorarm64): unknown -> 2.1.2 (*)
|    |    +--- stdlib: 1.6.21 -> 1.8.0
|    |    +--- org.jetbrains.kotlin.native.platform.CoreFoundation: 1.6.21 -> 1.8.0 (*)
|    |    +--- org.jetbrains.kotlin.native.platform.darwin: 1.6.21 -> 1.8.0 (*)
|    |    +--- org.jetbrains.kotlin.native.platform.iconv: 1.6.21 -> 1.8.0 (*)
|    |    +--- org.jetbrains.kotlin.native.platform.posix: 1.6.21 -> 1.8.0 (*)
|    |    +--- org.jetbrains.kotlinx:atomicfu (org.jetbrains.kotlinx:atomicfu-iossimulatorarm64): 0.17.3 (*)
|    |    +--- org.jetbrains.kotlinx:atomicfu-cinterop-interop: 0.17.3 (*)
|    |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-core (org.jetbrains.kotlinx:kotlinx-coroutines-core-iossimulatorarm64): 1.6.4 (*)
|    +--- io.ktor:ktor-events (io.ktor:ktor-events-iossimulatorarm64): unknown -> 2.1.2 (*)
|    +--- io.ktor:ktor-http (io.ktor:ktor-http-iossimulatorarm64): unknown -> 2.1.2 (*)
|    +--- io.ktor:ktor-io (io.ktor:ktor-io-iossimulatorarm64): unknown -> 2.1.2 (*)
|    +--- io.ktor:ktor-serialization (io.ktor:ktor-serialization-iossimulatorarm64): 2.1.2 (*)
|    +--- io.ktor:ktor-utils (io.ktor:ktor-utils-iossimulatorarm64): unknown -> 2.1.2 (*)
|    +--- io.ktor:ktor-utils-cinterop-threadUtils: 2.1.2 (*)
|    +--- io.ktor:ktor-websocket-serialization (io.ktor:ktor-websocket-serialization-iossimulatorarm64): unknown -> 2.1.2 (*)
|    +--- io.ktor:ktor-websockets (io.ktor:ktor-websockets-iossimulatorarm64): unknown -> 2.1.2 (*)
|    +--- stdlib: 1.6.21 -> 1.8.0
|    +--- org.jetbrains.kotlin.native.platform.CoreFoundation: 1.6.21 -> 1.8.0 (*)
|    +--- org.jetbrains.kotlin.native.platform.darwin: 1.6.21 -> 1.8.0 (*)
|    +--- org.jetbrains.kotlin.native.platform.iconv: 1.6.21 -> 1.8.0 (*)
|    +--- org.jetbrains.kotlin.native.platform.posix: 1.6.21 -> 1.8.0 (*)
|    +--- org.jetbrains.kotlinx:atomicfu (org.jetbrains.kotlinx:atomicfu-iossimulatorarm64): 0.17.3 (*)
|    +--- org.jetbrains.kotlinx:atomicfu-cinterop-interop: 0.17.3 (*)
|    \--- org.jetbrains.kotlinx:kotlinx-coroutines-core (org.jetbrains.kotlinx:kotlinx-coroutines-core-iossimulatorarm64): 1.6.4 (*)
+--- io.ktor:ktor-client-core (io.ktor:ktor-client-core-iossimulatorarm64): 2.1.2 (*)
+--- io.ktor:ktor-serialization-kotlinx-json (io.ktor:ktor-serialization-kotlinx-json-iossimulatorarm64): 2.1.2
|    +--- io.ktor:ktor-http (io.ktor:ktor-http-iossimulatorarm64): 2.1.2 (*)
|    +--- io.ktor:ktor-io (io.ktor:ktor-io-iossimulatorarm64): unknown -> 2.1.2 (*)
|    +--- io.ktor:ktor-serialization (io.ktor:ktor-serialization-iossimulatorarm64): unknown -> 2.1.2 (*)
|    +--- io.ktor:ktor-serialization-kotlinx (io.ktor:ktor-serialization-kotlinx-iossimulatorarm64): 2.1.2
|    |    +--- io.ktor:ktor-http (io.ktor:ktor-http-iossimulatorarm64): 2.1.2 (*)
|    |    +--- io.ktor:ktor-io (io.ktor:ktor-io-iossimulatorarm64): unknown -> 2.1.2 (*)
|    |    +--- io.ktor:ktor-serialization (io.ktor:ktor-serialization-iossimulatorarm64): 2.1.2 (*)
|    |    +--- io.ktor:ktor-utils (io.ktor:ktor-utils-iossimulatorarm64): unknown -> 2.1.2 (*)
|    |    +--- io.ktor:ktor-utils-cinterop-threadUtils: 2.1.2 (*)
|    |    +--- io.ktor:ktor-websockets (io.ktor:ktor-websockets-iossimulatorarm64): unknown -> 2.1.2 (*)
|    |    +--- stdlib: 1.6.21 -> 1.8.0
|    |    +--- org.jetbrains.kotlin.native.platform.CoreFoundation: 1.6.21 -> 1.8.0 (*)
|    |    +--- org.jetbrains.kotlin.native.platform.darwin: 1.6.21 -> 1.8.0 (*)
|    |    +--- org.jetbrains.kotlin.native.platform.iconv: 1.6.21 -> 1.8.0 (*)
|    |    +--- org.jetbrains.kotlin.native.platform.posix: 1.6.21 -> 1.8.0 (*)
|    |    +--- org.jetbrains.kotlinx:atomicfu (org.jetbrains.kotlinx:atomicfu-iossimulatorarm64): 0.17.3 (*)
|    |    +--- org.jetbrains.kotlinx:atomicfu-cinterop-interop: 0.17.3 (*)
|    |    +--- org.jetbrains.kotlinx:kotlinx-coroutines-core (org.jetbrains.kotlinx:kotlinx-coroutines-core-iossimulatorarm64): 1.6.4 (*)
|    |    \--- org.jetbrains.kotlinx:kotlinx-serialization-core (org.jetbrains.kotlinx:kotlinx-serialization-core-iossimulatorarm64): 1.3.3
|    |         \--- stdlib: 1.6.21 -> 1.8.0
|    +--- io.ktor:ktor-utils (io.ktor:ktor-utils-iossimulatorarm64): unknown -> 2.1.2 (*)
|    +--- io.ktor:ktor-utils-cinterop-threadUtils: 2.1.2 (*)
|    +--- io.ktor:ktor-websockets (io.ktor:ktor-websockets-iossimulatorarm64): unknown -> 2.1.2 (*)
|    +--- stdlib: 1.6.21 -> 1.8.0
|    +--- org.jetbrains.kotlin.native.platform.CoreFoundation: 1.6.21 -> 1.8.0 (*)
|    +--- org.jetbrains.kotlin.native.platform.darwin: 1.6.21 -> 1.8.0 (*)
|    +--- org.jetbrains.kotlin.native.platform.iconv: 1.6.21 -> 1.8.0 (*)
|    +--- org.jetbrains.kotlin.native.platform.posix: 1.6.21 -> 1.8.0 (*)
|    +--- org.jetbrains.kotlinx:atomicfu (org.jetbrains.kotlinx:atomicfu-iossimulatorarm64): 0.17.3 (*)
|    +--- org.jetbrains.kotlinx:atomicfu-cinterop-interop: 0.17.3 (*)
|    +--- org.jetbrains.kotlinx:kotlinx-coroutines-core (org.jetbrains.kotlinx:kotlinx-coroutines-core-iossimulatorarm64): 1.6.4 (*)
|    +--- org.jetbrains.kotlinx:kotlinx-serialization-core (org.jetbrains.kotlinx:kotlinx-serialization-core-iossimulatorarm64): unknown -> 1.3.3 (*)
|    \--- org.jetbrains.kotlinx:kotlinx-serialization-json (org.jetbrains.kotlinx:kotlinx-serialization-json-iossimulatorarm64): 1.3.3
|         +--- stdlib: 1.6.21 -> 1.8.0
|         \--- org.jetbrains.kotlinx:kotlinx-serialization-core (org.jetbrains.kotlinx:kotlinx-serialization-core-iossimulatorarm64): 1.3.3 (*)

(*) - dependencies omitted (listed previously)

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':shared:linkPodDebugFrameworkIosApp'.
> Compilation finished with errors

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Jvm version mismatch

I had a working compose multi-platform application with android and desktop targets. But now I'm trying to improve navigation and add state handling with precompose. However, the first problem I'm hitting is one I don't know how to fix. This is the error message I get when trying to define my NavHost and scenes:

Cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option

I'm using JVM target 11 for the desktop build but 1.8 for the android build, because it doesn't support anything higher yet, AFAIK. Do you know how to fix this in my build.gradle files?

Kotlin 1.8

Hello.
Any chance this library will be migrated to kotlin 1.8?

is it possible to get launchSingleTop based on path parameter

hello,
is it possible to get launchSingleTop = true behavior on scene destinations that have different path parameters?

For example I have a list of detail views, and when clicked i want only 1 such instance to exist given the path parameter is the same.

nav to /home/1 (1 instance)
nav to /home/2 (1 instance)
nav to /home/2 (same instance as above)

Currently in 1.3.14 it seems that launchSingleTop=true, will only ever create 1 instance of a scene regardsless of its path parameters.

Kindly

Switch from buildSrc to version library

I have a branch in my fork that has a mostly working implementation of libs.versions.toml in place of the buildSrc module. This would enable automatic version updates via dependabot. I'm thinking this would be very helpful with keeping up with the various dependencies as many of them are changing rapidly.

I'm looking to prepare a PR for this based on any build fixes that are going in right now. Please let me know if there is interest in this or if we have reasons not to make that switch.

Error on startup

Exception in thread "main" java.lang.NoSuchMethodError: 'boolean androidx.compose.runtime.Composer.changedInstance(java.lang.Object)'
at moe.tlaster.precompose.PreComposeWindowKt.PreComposeWindow(PreComposeWindow.kt:41)

compose desktop on ubuntu

Access Navigator outside of a Composable block

Hello,

First of all, thanks for this amazing lib.

I need help in the following use case:

  • I have NavHost declared as in your sample. It contains a couple of scenes.
  • Part of the business logic is in Swift. Based on a condition, I need to navigate to a scene from Swift code.

For this purpose, I wrote a function navigateToMainScreen in iosMain - it is called from Swift.

Now I need to access the Navigator instance in this function. How can I do this?

UIKit native navigation support

Hey.

Compose multiplatform 1.4 will support uikit-to-compose interop. Do you have plans to implement something like NativeNavHost with UINavigationController under the hood?

I made it in about 100 lines of code. Here is the result. Looks almost native except of material views :)

Btw, your library is awesome, thanks for it

Untitled-2.mp4

I can't run on IOS

I clone your samples and run on android but I can't run on IOS, can you help me?

CompositionLocal ViewModelStoreOwner not present

Uncaught Kotlin exception: kotlin.IllegalStateException: CompositionLocal ViewModelStoreOwner not present
    at 0   iosApp                              0x106f21b0b        kfun:kotlin.Throwable#<init>(kotlin.String?){} + 107 
    at 1   iosApp                              0x106f1b267        kfun:kotlin.Exception#<init>(kotlin.String?){} + 103 
    at 2   iosApp                              0x106f1b547        kfun:kotlin.RuntimeException#<init>(kotlin.String?){} + 103 
    at 3   iosApp                              0x106f1b947        kfun:kotlin.IllegalStateException#<init>(kotlin.String?){} + 103 
    at 4   iosApp                              0x10775ea43        kfun:moe.tlaster.precompose.ui.noLocalProvidedFor#internal + 643 
    at 5   iosApp                              0x10775eaf2        kfun:moe.tlaster.precompose.ui.LocalViewModelStoreOwner$lambda$1#internal + 66 
    at 6   iosApp                              0x10775ebaf        kfun:moe.tlaster.precompose.ui.$LocalViewModelStoreOwner$lambda$1$FUNCTION_REFERENCE$48.invoke#internal + 63 
    at 7   iosApp                              0x106f37b86        kfun:kotlin.native.concurrent.SynchronizedLazyImpl#<get-value>(){}1:0 + 1174 
    at 8   iosApp                              0x1071932be        kfun:androidx.compose.runtime.LazyValueHolder.<get-current>#internal + 222 
    at 9   iosApp                              0x1071933b1        kfun:androidx.compose.runtime.LazyValueHolder#<get-value>(){}1:0 + 81 
    at 10  iosApp                              0x1070f735b        kfun:androidx.compose.runtime.ComposerImpl.resolveCompositionLocal#internal + 315 
    at 11  iosApp                              0x1070f6d27        kfun:androidx.compose.runtime.ComposerImpl#consume(androidx.compose.runtime.CompositionLocal<0:0>){0§<kotlin.Any?>}0:0 + 247 
    at 12  iosApp                              0x10775f3e0        kfun:moe.tlaster.precompose.ui#viewModel(kotlin.reflect.KClass<0:0>;kotlin.collections.List<kotlin.Any?>?;kotlin.Function0<0:0>;androidx.compose.runtime.Composer?;kotlin.Int;kotlin.Int){0§<moe.tlaster.precompose.viewmodel.ViewModel>}0:0 + 2048 
    at 13  iosApp                              0x107747744        kfun:moe.tlaster.precompose.navigation#rememberNavigator(androidx.compose.runtime.Composer?;kotlin.Int){}moe.tlaster.precompose.navigation.Navigator + 644 
    at 14  iosApp                              0x107764de0        kfun:com.example.kmmstructure#MyApplication(androidx.compose.runtime.Composer?;kotlin.Int){} + 1888 
    at 15  iosApp                              0x107762d3c        kfun:com.example.kmmstructure#Content(androidx.compose.runtime.Composer?;kotlin.Int){} + 1196 
    at 16  iosApp                              0x107769a5b        kfun:com.example.kmmstructure.ComposableSingletons$RootViewControllerKt.<init>$lambda$0#internal + 651 
    at 17  iosApp                              0x107769bb1        kfun:com.example.kmmstructure.ComposableSingletons$RootViewControllerKt.$<init>$lambda$0$FUNCTION_REFERENCE$11.invoke#internal + 97 
    at 18  iosApp                              0x107769c6d        kfun:com.example.kmmstructure.ComposableSingletons$RootViewControllerKt.$<init>$lambda$0$FUNCTION_REFERENCE$11.$<bridge-UNNNB>invoke(androidx.compose.runtime.Composer;kotlin.Int){}#internal + 173 
    at 19  iosApp                              0x107221842        kfun:androidx.compose.runtime.internal.ComposableLambdaImpl#invoke(androidx.compose.runtime.Composer;kotlin.Int){}kotlin.Any? + 1106 
    at 20  iosApp                              0x107237991        kfun:androidx.compose.runtime.internal.ComposableLambdaImpl#$<bridge-NNNNB>invoke(androidx.compose.runtime.Composer;kotlin.Int){}kotlin.Any?(androidx.compose.runtime.Composer;kotlin.Any?){}kotlin.Any? + 177 
    at 21  iosApp                              0x1071376de        kfun:androidx.compose.runtime#CompositionLocalProvider(kotlin.Array<out|androidx.compose.runtime.ProvidedValue<*>>...;kotlin.Function2<androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>;androidx.compose.runtime.Composer?;kotlin.Int){} + 958 
    at 22  iosApp                              0x10754f311        kfun:androidx.compose.ui.ComposeScene.setContent$lambda$8#internal + 1153 
    at 23  iosApp                              0x1075510ae        kfun:androidx.compose.ui.ComposeScene.$setContent$lambda$8$FUNCTION_REFERENCE$781.invoke#internal + 126 
    at 24  iosApp                              0x10755120d        kfun:androidx.compose.ui.ComposeScene.$setContent$lambda$8$FUNCTION_REFERENCE$781.$<bridge-UNNNB>invoke(androidx.compose.runtime.Composer;kotlin.Int){}#internal + 173 
    at 25  iosApp                              0x107221842        kfun:androidx.compose.runtime.internal.ComposableLambdaImpl#invoke(androidx.compose.runtime.Composer;kotlin.Int){}kotlin.Any? + 1106 
    at 26  iosApp                              0x107237991        kfun:androidx.compose.runtime.internal.ComposableLambdaImpl#$<bridge-NNNNB>invoke(androidx.compose.runtime.Composer;kotlin.Int){}kotlin.Any?(androidx.compose.runtime.Composer;kotlin.Any?){}kotlin.Any? + 177 
    at 27  iosApp                              0x1071376de        kfun:androidx.compose.runtime#CompositionLocalProvider(kotlin.Array<out|androidx.compose.runtime.ProvidedValue<*>>...;kotlin.Function2<androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>;androidx.compose.runtime.Composer?;kotlin.Int){} + 958 
    at 28  iosApp                              0x107517bd6        kfun:androidx.compose.ui.platform#ProvideCommonCompositionLocals(androidx.compose.ui.node.Owner;androidx.compose.ui.platform.UriHandler;kotlin.Function2<androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>;androidx.compose.runtime.Composer?;kotlin.Int){} + 8230 
    at 29  iosApp                              0x107574b0e        kfun:androidx.compose.ui.platform.setContent$lambda$3$lambda$2#internal + 2174 
    at 30  iosApp                              0x107575986        kfun:androidx.compose.ui.platform.$setContent$lambda$3$lambda$2$FUNCTION_REFERENCE$804.invoke#internal + 134 
    at 31  iosApp                              0x107575b1d        kfun:androidx.compose.ui.platform.$setContent$lambda$3$lambda$2$FUNCTION_REFERENCE$804.$<bridge-UNNNB>invoke(androidx.compose.runtime.Composer;kotlin.Int){}#internal + 173 
    at 32  iosApp                              0x107221842        kfun:androidx.compose.runtime.internal.ComposableLambdaImpl#invoke(androidx.compose.runtime.Composer;kotlin.Int){}kotlin.Any? + 1106 
    at 33  iosApp                              0x107237991        kfun:androidx.compose.runtime.internal.ComposableLambdaImpl#$<bridge-NNNNB>invoke(androidx.compose.runtime.Composer;kotlin.Int){}kotlin.Any?(androidx.compose.runtime.Composer;kotlin.Any?){}kotlin.Any? + 177 
    at 34  iosApp                              0x1075733d9        kfun:androidx.compose.ui.platform.provide#internal + 2713 
    at 35  iosApp                              0x10757520e        kfun:androidx.compose.ui.platform.setContent$lambda$3#internal + 1166 
    at 36  iosApp                              0x10757548d        kfun:androidx.compose.ui.platform.$setContent$lambda$3$FUNCTION_REFERENCE$801.invoke#internal + 141 
    at 37  iosApp                              0x10757567d        kfun:androidx.compose.ui.platform.$setContent$lambda$3$FUNCTION_REFERENCE$801.$<bridge-UNNNB>invoke(androidx.compose.runtime.Composer;kotlin.Int){}#internal + 173 
    at 38  iosApp                              0x107221842        kfun:androidx.compose.runtime.internal.ComposableLambdaImpl#invoke(androidx.compose.runtime.Composer;kotlin.Int){}kotlin.Any? + 1106 
    at 39  iosApp                              0x107237991        kfun:androidx.compose.runtime.internal.ComposableLambdaImpl#$<bridge-NNNNB>invoke(androidx.compose.runtime.Composer;kotlin.Int){}kotlin.Any?(androidx.compose.runtime.Composer;kotlin.Any?){}kotlin.Any? + 177 
    at 40  iosApp                              0x10721ff08        kfun:androidx.compose.runtime#invokeComposable(androidx.compose.runtime.Composer;kotlin.Function2<androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>){} + 360 
    at 41  iosApp                              0x107111071        kfun:androidx.compose.runtime.ComposerImpl.doCompose$lambda$25#internal + 417 
    at 42  iosApp                              0x10711694b        kfun:androidx.compose.runtime.ComposerImpl.$doCompose$lambda$25$FUNCTION_REFERENCE$1015.invoke#internal + 91 
    at 43  iosApp                              0x107116a8d        kfun:androidx.compose.runtime.ComposerImpl.$doCompose$lambda$25$FUNCTION_REFERENCE$1015.$<bridge-UNN>invoke(){}#internal + 77 
    at 44  iosApp                              0x10713a3cc        kfun:androidx.compose.runtime#observeDerivedStateRecalculations(kotlin.Function1<androidx.compose.runtime.State<*>,kotlin.Unit>;kotlin.Function1<androidx.compose.runtime.State<*>,kotlin.Unit>;kotlin.Function0<0:0>){0§<kotlin.Any?>} + 1196 
    at 45  iosApp                              0x107103c67        kfun:androidx.compose.runtime.ComposerImpl.doCompose#internal + 2791 
    at 46  iosApp                              0x1071028d3        kfun:androidx.compose.runtime.ComposerImpl#composeContent(androidx.compose.runtime.collection.IdentityArrayMap<androidx.compose.runtime.RecomposeScopeImpl,androidx.compose.runtime.collection.IdentityArraySet<kotlin.Any>?>;kotlin.Function2<androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>){} + 515 
    at 47  iosApp                              0x107125c3c        kfun:androidx.compose.runtime.CompositionImpl#composeContent(kotlin.Function2<androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>){} + 700 
    at 48  iosApp                              0x107154cf8        kfun:androidx.compose.runtime.Recomposer#composeInitial(androidx.compose.runtime.ControlledComposition;kotlin.Function2<androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>){} + 1144 
    at 49  iosApp                              0x107124f04        kfun:androidx.compose.runtime.CompositionImpl#setContent(kotlin.Function2<androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>){} + 580 
    at 50  iosApp                              0x107572895        kfun:androidx.compose.ui.platform#setContent__at__androidx.compose.ui.platform.SkiaBasedOwner(androidx.compose.runtime.CompositionContext;kotlin.Function0<androidx.compose.runtime.CompositionLocalContext?>;kotlin.Function2<androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>){}androidx.compose.runtime.Composition + 821 
    at 51  iosApp                              0x10754891e        kfun:androidx.compose.ui.ComposeScene#setContent(androidx.compose.runtime.CompositionContext?;kotlin.Function1<androidx.compose.ui.input.key.KeyEvent,kotlin.Boolean>;kotlin.Function1<androidx.compose.ui.input.key.KeyEvent,kotlin.Boolean>;kotlin.Function2<androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>){} + 2062 
    at 52  iosApp                              0x107548c6a        kfun:androidx.compose.ui.ComposeScene#setContent$default(androidx.compose.runtime.CompositionContext?;kotlin.Function1<androidx.compose.ui.input.key.KeyEvent,kotlin.Boolean>?;kotlin.Function1<androidx.compose.ui.input.key.KeyEvent,kotlin.Boolean>?;kotlin.Function2<androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>;kotlin.Int){} + 634 
    at 53  iosApp                              0x107541935        kfun:androidx.compose.ui.native.ComposeLayer.setContent$lambda$2#internal + 325 
    at 54  iosApp                              0x107541d52        kfun:androidx.compose.ui.native.ComposeLayer.$setContent$lambda$2$FUNCTION_REFERENCE$763.invoke#internal + 98 
    at 55  iosApp                              0x107541edd        kfun:androidx.compose.ui.native.ComposeLayer.$setContent$lambda$2$FUNCTION_REFERENCE$763.$<bridge-UNN>invoke(){}#internal + 77 
    at 56  iosApp                              0x1075416d8        kfun:androidx.compose.ui.native.ComposeLayer.initContent#internal + 296 
    at 57  iosApp                              0x107541272        kfun:androidx.compose.ui.native.ComposeLayer#setContent(kotlin.Function1<androidx.compose.ui.input.key.KeyEvent,kotlin.Boolean>;kotlin.Function1<androidx.compose.ui.input.key.KeyEvent,kotlin.Boolean>;kotlin.Function2<androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>){} + 418 
    at 58  iosApp                              0x107541483        kfun:androidx.compose.ui.native.ComposeLayer#setContent$default(kotlin.Function1<androidx.compose.ui.input.key.KeyEvent,kotlin.Boolean>?;kotlin.Function1<androidx.compose.ui.input.key.KeyEvent,kotlin.Boolean>?;kotlin.Function2<androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>;kotlin.Int){} + 483 
    at 59  iosApp                              0x10757b6f0        kfun:androidx.compose.ui.window.ComposeWindow#objc:loadView + 1808 
    at 60  iosApp                              0x107585423        _6f72672e6a6574627261696e732e636f6d706f73652e75693a75692f6f70742f6275696c644167656e742f776f726b2f626136303535356439646465393261652f636f6d706f73652f6672616d65776f726b732f737570706f72742f636f6d706f73652f75692f75692f7372632f75696b69744d61696e2f6b6f746c696e2f616e64726f6964782f636f6d706f73652f75692f77696e646f772f436f6d706f736557696e646f772e75696b69742e6b74_knbridge91 + 163 
    at 61  UIKitCore                           0x10a0ace9b        -[UIViewController loadViewIfRequired] + 92 
    at 62  UIKitCore                           0x10a0ad6c8        -[UIViewController view] + 26 
    at 63  iosApp                              0x106f0905f        $s6iosApp12AvoidDisposeC14viewWillAppearyySbF + 415 (/Users/linh/StudioProjects/KMMStructure/iosApp/iosApp/AvoidDispose.swift:28:36)
    at 64  iosApp                              0x106f09171        $s6iosApp12AvoidDisposeC14viewWillAppearyySbFTo + 49 
    at 65  UIKitCore                           0x10a0b37cc        -[UIViewController _setViewAppearState:isAnimating:] + 1393 
    at 66  UIKitCore                           0x10a0b405e        -[UIViewController __viewWillAppear:] + 97 
    at 67  UIKitCore                           0x109f7efa0        __56-[UIPresentationController runTransitionForCurrentState]_block_invoke.421 + 1126 
    at 68  UIKitCore                           0x109f85749        +[UIPresentationController _scheduleTransition:] + 78 
    at 69  UIKitCore                           0x109f7e8cb        -[UIPresentationController runTransitionForCurrentState] + 2209 
    at 70  UIKitCore                           0x109f7b6fb        -[UIPresentationController _presentWithAnimationController:inWindow:interactionController:target:didFinish:] + 878 
    at 71  UIKitCore                           0x10a9f02e9        -[UIWindow addRootViewControllerViewIfPossible] + 592 
    at 72  UIKitCore                           0x10a9ef8c7        -[UIWindow _updateLayerOrderingAndSetLayerHidden:actionBlock:] + 288 
    at 73  UIKitCore                           0x10a9f0e1f        -[UIWindow _setHidden:forced:] + 408 
    at 74  UIKitCore                           0x10aa05b2a        -[UIWindow _mainQueue_makeKeyAndVisible] + 46 
    at 75  iosApp                              0x106f0760e        $s6iosApp0B8DelegateC11application_29didFinishLaunchingWithOptionsSbSo13UIApplicationC_SDySo0j6LaunchI3KeyaypGSgtF + 846 (/Users/linh/StudioProjects/KMMStructure/iosApp/iosApp/iOSApp.swift:17:16)
    at 76  iosApp                              0x106f077d6        $s6iosApp0B8DelegateC11application_29didFinishLaunchingWithOptionsSbSo13UIApplicationC_SDySo0j6LaunchI3KeyaypGSgtFTo + 182 
    at 77  UIKitCore                           0x10a9a4662        -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 270 
    at 78  UIKitCore                           0x10a9a6506        -[UIApplication _callInitializationDelegatesWithActions:forCanvas:payload:fromOriginatingProcess:] + 4256 
    at 79  UIKitCore                           0x10a9ac2e2        -[UIApplication _runWithMainScene:transitionContext:completion:] + 1235 
    at 80  UIKitCore                           0x109dd88ab        -[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:] + 121 
    at 81  UIKitCore                           0x10a44d1e0        _UIScenePerformActionsWithLifecycleActionMask + 87 
    at 82  UIKitCore                           0x109dd93a5        __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 197 
    at 83  UIKitCore                           0x109dd8de2        -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 251 
    at 84  UIKitCore                           0x109dd91db        -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 830 
    at 85  UIKitCore                           0x109dd8a88        -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 353 
    at 86  UIKitCore                           0x109de78f4        __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke + 177 
    at 87  UIKitCore                           0x10a31d946        +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:fromCurrentState:actions:completion:] + 832 
    at 88  UIKitCore                           0x10a46b2a2        _UISceneSettingsDiffActionPerformChangesWithTransitionContextAndCompletion + 256 
    at 89  UIKitCore                           0x109de7574        -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 347 
    at 90  UIKitCore                           0x109bca5ad        __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke.594 + 814 
    at 91  UIKitCore                           0x109bc8fc3        -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 244 
    at 92  UIKitCore                           0x109bca15a        -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 254 
    at 93  UIKitCore                           0x10a9aaae8        -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 732 
    at 94  UIKitCore                           0x10a35036a        -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 349 
    at 95  FrontBoardServices                  0x7ff80549db3a     -[FBSScene _callOutQueue_agent_didCreateWithTransitionContext:completion:] + 414 
    at 96  FrontBoardServices                  0x7ff8054cc7b9     __92-[FBSWorkspaceScenesClient createSceneWithIdentity:parameters:transitionContext:completion:]_block_invoke.187 + 101 
    at 97  FrontBoardServices                  0x7ff8054abb89     -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 208 
    at 98  FrontBoardServices                  0x7ff8054cc3ae     __92-[FBSWorkspaceScenesClient createSceneWithIdentity:parameters:transitionContext:completion:]_block_invoke + 343 
    at 99  libdispatch.dylib                   0x7ff80013ca39     _dispatch_client_callout + 7 
    at 100 libdispatch.dylib                   0x7ff8001404be     _dispatch_block_invoke_direct + 483 
    at 101 FrontBoardServices                  0x7ff8054f2bb7     __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 29 
    at 102 FrontBoardServices                  0x7ff8054f2aad     -[FBSSerialQueue _targetQueue_performNextIfPossible] + 173 
    at 103 FrontBoardServices                  0x7ff8054f2bdf     -[FBSSerialQueue _performNextFromRunLoopSource] + 18 
    at 104 CoreFoundation                      0x7ff800387fe4     __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 16 
    at 105 CoreFoundation                      0x7ff800387f23     __CFRunLoopDoSource0 + 156 
    at 106 CoreFoundation                      0x7ff800387720     __CFRunLoopDoSources0 + 211 
    at 107 CoreFoundation                      0x7ff800381e22     __CFRunLoopRun + 926 
    at 108 CoreFoundation                      0x7ff8003816a6     CFRunLoopRunSpecific + 559 
    at 109 GraphicsServices                    0x7ff809cb1289     GSEventRunModal + 138 
    at 110 UIKitCore                           0x10a9a8ad2        -[UIApplication _run] + 993 
    at 111 UIKitCore                           0x10a9ad9ee        UIApplicationMain + 122 
    at 112 iosApp                              0x106f07abe        main + 62 (/Users/linh/StudioProjects/KMMStructure/iosApp/iosApp/iOSApp.swift:<unknown>)
    at 113 dyld                                0x1096ec2be        0x0 + 4453221054 
    at 114 ???                                 0x113e6a30f        0x0 + 4628849423 

Process finished with exit code 0

I got this issue when I tried to use Precompose for iOS. Would you happen to have any idea?
Version: 1.3.14

Error: No StateHolder provided

I try put ViewModels in share module, and put compose code in androidApp. When the app is going to running, it's encounter a crash with error: java.lang.IllegalStateException: No StateHolder provided.
Here is my code:

@Composable
// androidMain module
fun InboxScreen(navigate: (chatId: String?, newChat: NewChat?) -> Unit) {
    val viewModel = viewModel(InboxViewModel::class) {
        InboxViewModel()
    }
}

// shared module
class InboxViewModel : ViewModel() { ... }

commonMain can't find any package from PreCompose but other modules can

I'm using the official compose multiplatforms template from JetBrains/compose-jb.

commonMain can't find any package from PreCompose, of course, including the classes, and Android Studio marks them red.
However, when I import moe.tlaster.* in desktopMain, it works.

After researching, I read this issue and speculate it may be because of how you publish this library not an issue of compose multiplatform.

Furthermore, your sample project is using api(project(":precompose")), yes I can build and run it, so it doesn't meet this issue.

at common/build.gradle.kts

kotlin {
    android()
    jvm("desktop")

    sourceSets {
        named("commonMain") {
            dependencies {
                api(compose.runtime)
                api(compose.foundation)
                api(compose.material)
                // Needed only for preview.
                implementation(compose.preview)
                api("moe.tlaster:precompose:1.1.5")
            }
        }
        named("androidMain") {
            dependencies {
                api("androidx.appcompat:appcompat:1.4.2")
                api("androidx.core:core-ktx:1.8.0")
            }
        }
    }
}

java.lang.NoSuchFieldError: $stable

Hey man, appreciate the work behind Precompose and definitely think there's a future for it as it leans really close to Android indeed.

I'm currently trying to implement the navigation for a Compose Desktop app, but I'm running into the following stacktrace as soon as the app launches and it draws the Home-page:

> Task :desktop:run
Exception in thread "AWT-EventQueue-0 @coroutine#6" java.lang.NoSuchFieldError: $stable
	at moe.tlaster.precompose.navigation.transition.AnimatedRouteKt$AnimatedRoute$2$1.invoke(AnimatedRoute.kt:66)
	at moe.tlaster.precompose.navigation.transition.AnimatedRouteKt$AnimatedRoute$2$1.invoke(AnimatedRoute.kt:64)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
	at moe.tlaster.precompose.navigation.transition.AnimatedRouteKt.AnimatedRoute(AnimatedRoute.kt:94)
	at moe.tlaster.precompose.navigation.NavHostKt.NavHost(NavHost.kt:70)
	at moe.tlaster.precompose.navigation.NavHostKt$NavHost$5.invoke(NavHost.kt)
	at moe.tlaster.precompose.navigation.NavHostKt$NavHost$5.invoke(NavHost.kt)
	at androidx.compose.runtime.RecomposeScopeImpl.compose(RecomposeScopeImpl.kt:140)
	at androidx.compose.runtime.ComposerImpl.recomposeToGroupEnd(Composer.kt:2162)
	at androidx.compose.runtime.ComposerImpl.skipCurrentGroup(Composer.kt:2405)
	at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:2586)
	at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:2579)
	at androidx.compose.runtime.SnapshotStateKt.observeDerivedStateRecalculations(SnapshotState.kt:540)
	at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:2572)
	at androidx.compose.runtime.ComposerImpl.recompose$runtime(Composer.kt:2548)
	at androidx.compose.runtime.CompositionImpl.recompose(Composition.kt:612)
	at androidx.compose.runtime.Recomposer.performRecompose(Recomposer.kt:764)
	at androidx.compose.runtime.Recomposer.access$performRecompose(Recomposer.kt:103)
	at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$2.invoke(Recomposer.kt:447)
	at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$2.invoke(Recomposer.kt:416)
	at androidx.compose.runtime.BroadcastFrameClock$FrameAwaiter.resume(BroadcastFrameClock.kt:42)
	at androidx.compose.runtime.BroadcastFrameClock.sendFrame(BroadcastFrameClock.kt:71)
	at androidx.compose.ui.platform.DesktopOwners.onFrame(DesktopOwners.desktop.kt:125)
	at androidx.compose.ui.awt.ComposeLayer$1.onRender(ComposeLayer.desktop.kt:147)
	at org.jetbrains.skiko.SkiaLayer.update$skiko(SkiaLayer.kt:314)
	at org.jetbrains.skiko.redrawer.MetalRedrawer.update(MetalRedrawer.kt:57)
	at org.jetbrains.skiko.redrawer.MetalRedrawer.access$update(MetalRedrawer.kt:17)
	at org.jetbrains.skiko.redrawer.MetalRedrawer$frameDispatcher$1.invokeSuspend(MetalRedrawer.kt:29)
	at org.jetbrains.skiko.redrawer.MetalRedrawer$frameDispatcher$1.invoke(MetalRedrawer.kt)
	at org.jetbrains.skiko.redrawer.MetalRedrawer$frameDispatcher$1.invoke(MetalRedrawer.kt)
	at org.jetbrains.skiko.FrameDispatcher$job$1.invokeSuspend(FrameDispatcher.kt:36)
	(Coroutine boundary)
	at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2.invokeSuspend(Recomposer.kt:416)
	at androidx.compose.runtime.Recomposer$recompositionRunner$2$2.invokeSuspend(Recomposer.kt:673)
	at androidx.compose.runtime.Recomposer$recompositionRunner$2.invokeSuspend(Recomposer.kt:672)
	at androidx.compose.ui.platform.DesktopOwners$2.invokeSuspend(DesktopOwners.desktop.kt:82)
	(Coroutine creation stacktrace)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startCoroutineUndispatched(Undispatched.kt:184)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch(Builders.common.kt:56)
	at kotlinx.coroutines.BuildersKt.launch(Unknown Source)
	at androidx.compose.ui.platform.DesktopOwners.<init>(DesktopOwners.desktop.kt:81)
	at androidx.compose.ui.awt.ComposeLayer.<init>(ComposeLayer.desktop.kt:68)
	at androidx.compose.ui.awt.ComposeWindowDelegate.<init>(ComposeWindowDelegate.desktop.kt:37)
	at androidx.compose.ui.awt.ComposeWindow.<init>(ComposeWindow.desktop.kt:36)
	at androidx.compose.desktop.AppWindow.<init>(AppWindow.desktop.kt:131)
	at androidx.compose.desktop.AppWindow.<init>(AppWindow.desktop.kt)
	at androidx.compose.desktop.AppWindow_desktopKt$Window$1.run(AppWindow.desktop.kt:95)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by: java.lang.NoSuchFieldError: $stable
	at moe.tlaster.precompose.navigation.transition.AnimatedRouteKt$AnimatedRoute$2$1.invoke(AnimatedRoute.kt:66)
	at moe.tlaster.precompose.navigation.transition.AnimatedRouteKt$AnimatedRoute$2$1.invoke(AnimatedRoute.kt:64)
Caused by: java.lang.NoSuchFieldError: $stable

	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
	at moe.tlaster.precompose.navigation.transition.AnimatedRouteKt.AnimatedRoute(AnimatedRoute.kt:94)
	at moe.tlaster.precompose.navigation.NavHostKt.NavHost(NavHost.kt:70)
	at moe.tlaster.precompose.navigation.NavHostKt$NavHost$5.invoke(NavHost.kt)
	at moe.tlaster.precompose.navigation.NavHostKt$NavHost$5.invoke(NavHost.kt)
	at androidx.compose.runtime.RecomposeScopeImpl.compose(RecomposeScopeImpl.kt:140)
	at androidx.compose.runtime.ComposerImpl.recomposeToGroupEnd(Composer.kt:2162)
	at androidx.compose.runtime.ComposerImpl.skipCurrentGroup(Composer.kt:2405)
	at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:2586)
	at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:2579)
	at androidx.compose.runtime.SnapshotStateKt.observeDerivedStateRecalculations(SnapshotState.kt:540)
	at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:2572)
	at androidx.compose.runtime.ComposerImpl.recompose$runtime(Composer.kt:2548)
	at androidx.compose.runtime.CompositionImpl.recompose(Composition.kt:612)
	at androidx.compose.runtime.Recomposer.performRecompose(Recomposer.kt:764)
	at androidx.compose.runtime.Recomposer.access$performRecompose(Recomposer.kt:103)
	at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$2.invoke(Recomposer.kt:447)
	at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$2.invoke(Recomposer.kt:416)
	at androidx.compose.runtime.BroadcastFrameClock$FrameAwaiter.resume(BroadcastFrameClock.kt:42)
	at androidx.compose.runtime.BroadcastFrameClock.sendFrame(BroadcastFrameClock.kt:71)
	at androidx.compose.ui.platform.DesktopOwners.onFrame(DesktopOwners.desktop.kt:125)
	at androidx.compose.ui.awt.ComposeLayer$1.onRender(ComposeLayer.desktop.kt:147)
	at org.jetbrains.skiko.SkiaLayer.update$skiko(SkiaLayer.kt:314)
	at org.jetbrains.skiko.redrawer.MetalRedrawer.update(MetalRedrawer.kt:57)
	at org.jetbrains.skiko.redrawer.MetalRedrawer.access$update(MetalRedrawer.kt:17)
	at org.jetbrains.skiko.redrawer.MetalRedrawer$frameDispatcher$1.invokeSuspend(MetalRedrawer.kt:29)
	at org.jetbrains.skiko.redrawer.MetalRedrawer$frameDispatcher$1.invoke(MetalRedrawer.kt)
	at org.jetbrains.skiko.redrawer.MetalRedrawer$frameDispatcher$1.invoke(MetalRedrawer.kt)
	at org.jetbrains.skiko.FrameDispatcher$job$1.invokeSuspend(FrameDispatcher.kt:36)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	... 13 more

I'm currently trying to reproduce my Android app in a separate repository for a Desktop app as there are currently too many version-misalignment issues to get both running well in the same project. And as soon as it has built the Scaffold that contains the NavHost, it seems to throw this stacktrace.

Would you by any chance know what the issue could be?

Make ProvideDesktopCompositionLocals visibile to use different window object

Hi! I want to use another window (JBWindow) for different theming/styling, which suits more for me. I see that you wrap only the normal Window with this ProvideDesktopCompositionLocals. Can you make ProvideDesktopCompositionLocals and what it depends on visibile that I can use it to wrap my own window? Or do you have another approach, to use another different window object?

ProvideDesktopCompositionLocals(
        holder
    ) {
        Window(
            onCloseRequest = {
                holder.lifecycle.currentState = Lifecycle.State.Destroyed
                onCloseRequest.invoke()
            },
            state = state,
            visible = visible,
            title = title,
            icon = icon,
            undecorated = undecorated,
            transparent = transparent,
            resizable = resizable,
            enabled = enabled,
            focusable = focusable,
            alwaysOnTop = alwaysOnTop,
            onPreviewKeyEvent = onPreviewKeyEvent,
            onKeyEvent = onKeyEvent,
            content = {
                content.invoke(this)
            }
        )
    }

Build issue

Hi,
I get this error when I try to run it on iOS

> Task :common:linkPodDebugFrameworkIosX64 FAILED
e: Module "moe.tlaster:precompose" has a reference to symbol [ moe.tlaster.precompose.ui/viewModel|-270356911908209679[0] <- local Local[<TP>,0 | TYPE_PARAMETER name:T index:0 variance: superTypes:[moe.tlaster.precompose.viewmodel.ViewModel] reified:true] ]. Neither the module itself nor its dependencies contain such declaration.

This could happen if the required dependency is missing in the project. Or if there is a dependency of "moe.tlaster:precompose" that has a different version in the project than the version that "moe.tlaster:precompose" was initially compiled with. Please check that the project configuration is correct and has consistent versions of all required dependencies.

The list of "moe.tlaster:precompose" dependencies that may lead to conflicts:
 1. "com.benasher44:uuid" (a library with unknown version)
 2. "org.jetbrains.compose.animation:animation (org.jetbrains.compose.animation:animation-uikitx64): 1.3.0" (was initially compiled with "org.jetbrains.compose.animation:animation (org.jetbrains.compose.animation:animation-uikitx64)")
 3. "org.jetbrains.compose.animation:animation-core (org.jetbrains.compose.animation:animation-core-uikitx64): 1.3.0" (was initially compiled with "org.jetbrains.compose.animation:animation-core (org.jetbrains.compose.animation:animation-core-uikitx64)")
 4. "org.jetbrains.compose.foundation:foundation (org.jetbrains.compose.foundation:foundation-uikitx64): 1.3.0" (was initially compiled with "org.jetbrains.compose.foundation:foundation (org.jetbrains.compose.foundation:foundation-uikitx64)")
 5. "org.jetbrains.compose.foundation:foundation-layout (org.jetbrains.compose.foundation:foundation-layout-uikitx64): 1.3.0" (was initially compiled with "org.jetbrains.compose.foundation:foundation-layout (org.jetbrains.compose.foundation:foundation-layout-uikitx64)")
 6. "org.jetbrains.compose.runtime:runtime (org.jetbrains.compose.runtime:runtime-uikitx64): 1.3.0" (was initially compiled with "org.jetbrains.compose.runtime:runtime (org.jetbrains.compose.runtime:runtime-uikitx64)")
 7. "org.jetbrains.compose.runtime:runtime-saveable (org.jetbrains.compose.runtime:runtime-saveable-uikitx64): 1.3.0" (was initially compiled with "org.jetbrains.compose.runtime:runtime-saveable (org.jetbrains.compose.runtime:runtime-saveable-uikitx64)")
 8. "org.jetbrains.compose.ui:ui (org.jetbrains.compose.ui:ui-uikitx64): 1.3.0" (was initially compiled with "org.jetbrains.compose.ui:ui (org.jetbrains.compose.ui:ui-uikitx64)")
 9. "org.jetbrains.compose.ui:ui-geometry (org.jetbrains.compose.ui:ui-geometry-uikitx64): 1.3.0" (was initially compiled with "org.jetbrains.compose.ui:ui-geometry (org.jetbrains.compose.ui:ui-geometry-uikitx64)")
10. "org.jetbrains.compose.ui:ui-graphics (org.jetbrains.compose.ui:ui-graphics-uikitx64): 1.3.0" (was initially compiled with "org.jetbrains.compose.ui:ui-graphics (org.jetbrains.compose.ui:ui-graphics-uikitx64)")
11. "org.jetbrains.compose.ui:ui-text (org.jetbrains.compose.ui:ui-text-uikitx64): 1.3.0" (was initially compiled with "org.jetbrains.compose.ui:ui-text (org.jetbrains.compose.ui:ui-text-uikitx64)")
12. "org.jetbrains.compose.ui:ui-unit (org.jetbrains.compose.ui:ui-unit-uikitx64): 1.3.0" (was initially compiled with "org.jetbrains.compose.ui:ui-unit (org.jetbrains.compose.ui:ui-unit-uikitx64)")
13. "org.jetbrains.compose.ui:ui-util (org.jetbrains.compose.ui:ui-util-uikitx64): 1.3.0" (was initially compiled with "org.jetbrains.compose.ui:ui-util (org.jetbrains.compose.ui:ui-util-uikitx64)")
14. "org.jetbrains.skiko:skiko (org.jetbrains.skiko:skiko-iosx64): 0.7.50" (was initially compiled with "org.jetbrains.skiko:skiko (org.jetbrains.skiko:skiko-iosx64)")
15. "org.jetbrains:annotations: 13.0" (a dependency of the library with unknown version or versions mismatch: "org.jetbrains:annotations")
16. "stdlib: 1.8.0" (was initially compiled with "stdlib: 1.6.20")
17. "org.jetbrains.kotlin.native.platform.posix: 1.8.0" (was initially compiled with "org.jetbrains.kotlin.native.platform.posix: 1.6.20")
18. "org.jetbrains.kotlin:kotlin-stdlib: 1.8.0" (a dependency of the library with unknown version or versions mismatch: "org.jetbrains.kotlin:kotlin-stdlib")
19. "org.jetbrains.kotlinx:atomicfu (org.jetbrains.kotlinx:atomicfu-iosx64): 0.17.3" (was initially compiled with "org.jetbrains.kotlinx:atomicfu (org.jetbrains.kotlinx:atomicfu-iosx64)")
20. "org.jetbrains.kotlinx:kotlinx-coroutines-core (org.jetbrains.kotlinx:kotlinx-coroutines-core-iosx64): 1.6.4" (was initially compiled with "org.jetbrains.kotlinx:kotlinx-coroutines-core (org.jetbrains.kotlinx:kotlinx-coroutines-core-iosx64)")

env versions :
Kotlin : 1.80
compose : 1.3.0

I try to build it my self and get same error

Support compose 1.5.0-dev1114

After I updated dependency compose.version=1.5.0-dev1104 to 1.5.0-dev1114

I am getting an error during execution

Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError:
'void androidx.compose.animation.AnimatedContentKt.AnimatedContent(Object, Modifier, Function1, Alignment, String, Function4, Composer, int, int)'
at moe.tlaster.precompose.navigation.NavHostKt.NavHost(NavHost.kt:135)

Plan for compatibility with the latest version of compose. Your library helps me a lot, thanks.

Migration guide from 1.3.0 to 1.4.0

Hi together,

I have issues to migrate to 1.4.0. Like with val viewModelStoreOwner = LocalViewModelStoreOwner.current
Do you have a complete guide or can create one?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.