ursus
06/14/2026, 1:14 PMrememberNavBackStack(Screen.Home)
this compiles fine on android
but fails on ios with Argument type mismatch: actual type is 'Screen.Home', but 'SavedStateConfiguration' was expected.
I get the point of the problem, but what I dont get is WHY does android compile fine?
I'd expect both to fail, no?
navigating inside the function brings me to
@Composable
public fun rememberNavBackStack(
configuration: SavedStateConfiguration,
vararg elements: NavKey,
)
so again, configuration parameter mandatoryefemoney
06/14/2026, 1:19 PMursus
06/14/2026, 1:19 PMefemoney
06/14/2026, 1:21 PMSavedStateConfiguration one. If that is not the case then something is wrong somewhere.ursus
06/14/2026, 1:22 PMursus
06/14/2026, 1:22 PMefemoney
06/14/2026, 1:25 PMursus
06/14/2026, 1:25 PMefemoney
06/14/2026, 1:25 PMursus
06/14/2026, 1:26 PMursus
06/14/2026, 1:26 PMefemoney
06/14/2026, 1:26 PMefemoney
06/14/2026, 1:26 PMursus
06/14/2026, 1:27 PMursus
06/14/2026, 1:27 PMorg.jetbrains.androidx.navigation3:navigation3-runtimeefemoney
06/14/2026, 1:28 PMursus
06/14/2026, 1:29 PMursus
06/14/2026, 1:29 PMefemoney
06/14/2026, 1:29 PMursus
06/14/2026, 1:30 PMefemoney
06/14/2026, 1:30 PMefemoney
06/14/2026, 1:31 PMursus
06/14/2026, 1:32 PMursus
06/14/2026, 1:33 PMefemoney
06/14/2026, 1:33 PMursus
06/14/2026, 1:33 PMursus
06/14/2026, 1:35 PMefemoney
06/14/2026, 1:38 PMefemoney
06/14/2026, 1:40 PMSSC just before you call rNBSursus
06/14/2026, 1:40 PMefemoney
06/14/2026, 1:41 PMursus
06/14/2026, 1:41 PMefemoney
06/14/2026, 1:43 PMursus
06/14/2026, 1:44 PMursus
06/14/2026, 1:44 PMefemoney
06/14/2026, 1:49 PMEntryProvider {
entry<MyScreen> { ... }
entry(MyScreen.serializer()) { ... }
}
you'd pick up the serializer at that point.
The first entry api can be for android (and jvm) because those platforms can use reflection, The second one is for other platforms where reflection is not possible.
Havent tried this myself, just thinking aloud.ursus
06/14/2026, 1:50 PMursus
06/14/2026, 1:50 PMursus
06/14/2026, 1:50 PMefemoney
06/14/2026, 1:50 PMefemoney
06/14/2026, 1:51 PMursus
06/14/2026, 1:51 PMefemoney
06/14/2026, 1:51 PMefemoney
06/14/2026, 1:52 PMursus
06/14/2026, 1:52 PMNavKeyefemoney
06/14/2026, 1:52 PMursus
06/14/2026, 1:53 PMefemoney
06/14/2026, 1:53 PMefemoney
06/14/2026, 1:53 PMursus
06/14/2026, 1:53 PMefemoney
06/14/2026, 1:55 PMursus
06/14/2026, 1:56 PMcomposeResources?efemoney
06/14/2026, 1:56 PMursus
06/14/2026, 1:57 PMefemoney
06/14/2026, 1:58 PMursus
06/14/2026, 1:58 PMefemoney
06/14/2026, 2:03 PMval Airplane by lazy { ImageVector.Builder(...).build() } although this is only for simple icons. Anything complex (eg flags) should probably be loaded and cached (Coil) or via lottie (if animated)