I am using compose-ios in an app, and something od...
# compose-ios
t
I am using compose-ios in an app, and something odd. It runs fine in the simulator, but on a real device I get an exception. Same code, same device (14 Pro Max). It is as follows:
Copy code
Uncaught Kotlin exception: kotlin.IllegalStateException: Vertically scrollable component was measured with an infinity maximum height constraints, which is disallowed. One of the common reasons is nesting layouts like LazyColumn and Column(Modifier.verticalScroll()). If you want to add a header before the list of items please add a header as a separate item() before the main items() inside the LazyColumn scope. There are could be other reasons for this to happen: your ComposeView was added into a LinearLayout with some weight, you applied Modifier.wrapContentSize(unbounded = true) or wrote a custom layout. Please try to remove the source of infinite constraints in the hierarchy above the scrolling container.
Compose 1.4.1 with 1.4.8 compiler with Kotlin 1.8.22. Thanks!
👍 1
I am wrapping the Compose view inside the ComposeUIViewController and then wrapping that in a SwiftUI view in the app.
d
Can you please create a minimal reproducible sample project on GitHub?