Yuvaraj
03/27/2025, 3:41 AMYuvaraj
03/27/2025, 3:57 AMComposeUIViewControllerDelegate viewDidDisappear and viewWillDisappear is never called
as per the doc it should work but it is not working https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-lifecycle.html#mapping-android-lifecycle-to-other-platformsFudge
03/30/2025, 9:08 PMJonathan
03/31/2025, 10:20 PMshared/src/iOSMain/kotlin
? I would like to add the UIKit view but I’m the JetBrains documentation only shows an example importing from platform package such as platform.MapKit.MKMapView
or platform.UIKit.UITextField
. I found an example importing a third-party library using Cocoapods but I wasn’t sure if this is a requirement of Compose Multiplatform or just a preference of the examples developer.Aleksey Zamulla
04/04/2025, 9:16 AMsweetclimusic
04/04/2025, 9:31 AMRok Oblak
04/04/2025, 9:04 PMkrzysztof
04/07/2025, 9:43 AMMate Ajdukovic
04/09/2025, 11:30 AMtestTag
.
But on iOS, Appium Inspector just shows a bunch of nested XCUIElementTypeOther
elements — nothing is accessible via accessibilityId
, XPATH, etc.
We tried adding Modifier.semantics { contentDescription = "..." }
alongside testTag
, built the Compose framework with ./gradlew linkDebugFrameworkIosSimulatorArm64
, added it to Xcode (Embed & Sign), cleaned DerivedData, and rebuilt the app. Still, the elements aren’t exposed in Appium or Xcode Accessibility Inspector.
Anyone got Compose-based elements discoverable on iOS for Appium? Are we missing something? Does anyone have an example of the repository where accessbility ID for iOS can be viewed using Appium Inspector?
Attached screenshot of how the PoC app looks like in Appium Inspector for Android and iOS app.xiaobailong24
04/14/2025, 3:05 PMאליהו הדס
04/21/2025, 1:37 PMMubarack Tahir
04/23/2025, 5:16 PM@Composable
fun annotatedString(text: String): AnnotatedString {
return runCatching {
AnnotatedString.fromHtml(text)
}.getOrDefault(AnnotatedString(text))
}
here is an example of the string
"font color='#DDDDDD'bCat/b/font and mouse are bfriends/b who loves uKotlin/u"Ori Spokoini
04/24/2025, 8:43 AMJohn O'Reilly
04/25/2025, 8:53 AMUndefined symbol: _kfun:androidx.compose.animation.core#androidx_compose_animation_core_MutableTransitionState$stableprop_getter$artificial(){}<http://kotlin.Int|kotlin.Int>
Undefined symbol: _kfun:androidx.compose.animation.core#androidx_compose_animation_core_TransitionState$stableprop_getter$artificial(){}<http://kotlin.Int|kotlin.Int>
Undefined symbol: _kfun:androidx.compose.ui.graphics.vector#androidx_compose_ui_graphics_vector_VectorPainter$stableprop_getter$artificial(){}<http://kotlin.Int|kotlin.Int>
Roland Ringgenberg
04/27/2025, 2:54 PMprivate fun emailAddressRegex(value: String): Boolean {
val emailRegex = Regex(
// Very basic regex, without checking for edge case or i18n etc
"[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}"
)
return value.matches(emailRegex)
}
I'm calling it from a BasicTextField using
snapshotFlow()
to update the state.
Btw, the fix of the BasicSecureTextField works like a charm, thx!Armond Avanes
04/28/2025, 1:06 AMenableTraceOSLog()
API (to enable iOS logging) can be called in any build type or it's intended to be used only in dev/debug/non-production builds?Jonathan
04/28/2025, 11:32 PMplatform.CoreLocation.CLLocation
but not APIs like platform.*.NWPathMonitor
?sweetclimusic
04/30/2025, 9:39 AMTerminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency', reason: 'child view controller:<_TtGC7SwiftUI19UIHostingControllerV12SharedApp13TextInputView_: 0x1008a0a00> should have parent view controller:(null) but actual parent is:<ComposeHostingViewController: 0x10122f860>'
So if this is the error, is it a case that I just need an empty UIViewController and add the newly hostedViewController to that? The other hidden context is that this is a bottomsheetjuhaodong
05/03/2025, 5:26 PMjuhaodong
05/03/2025, 5:26 PMMax
05/05/2025, 11:51 AMMarcel
05/06/2025, 11:31 AMScrollView {
VStack {
cmpView1
cmpView2
swiftView1
swiftView2
// ...
}
}
I'm using Compose 1.8.0-rc01, and this is how I'm creating the animation:
AnimatedVisibility(
modifier = Modifier.fillMaxWidth(),
visible = state.isVisible,
enter = fadeIn(animationSpec = tween(durationMillis = 500)) + expandVertically(
expandFrom = <http://Alignment.Top|Alignment.Top>,
animationSpec = tween(durationMillis = 500)
),
exit = fadeOut(animationSpec = tween(durationMillis = 500)) + shrinkVertically(
shrinkTowards = <http://Alignment.Top|Alignment.Top>,
animationSpec = tween(durationMillis = 500)
)
) {
// Banner
}
Any possible solutions to make it look nicer?xiaobailong24
05/06/2025, 11:10 PMursus
05/07/2025, 2:54 AMHeehoon Jeon
05/07/2025, 5:27 AM1.8.0
, and for multiplatform-navigation, it's 2.9.0-beta01
.
The problem is that when using androidx.compose.ui.window.Dialog
in commonMain
, the dialog no longer appears after using features like an in-app browser
or the native camera
.
Is there a way to solve this?
this code working in cmp 1.7.3
, navigation 2.8.0-alpha10
Below is the test code:
NavHost(
navController = navController,
startDestination = startDestination,
) {
composable(route = "home") {
Home()
}
}
@Composable
private fun Home() {
var openDialog by remember { mutableStateOf(false) }
Column(
modifier = Modifier
.systemBarsPadding()
.fillMaxWidth(),
horizontalAlignment = Alignment.CenterHorizontally
) {
Text("Home")
Button(
onClick = { openDialog = true }
) {
Text("Open Dialog")
}
Button(
onClick = { PlatformInAppBrowserController.launch("<https://blog.jetbrains.com/kotlin/2025/05/compose-multiplatform-1-8-0-released-compose-multiplatform-for-ios-is-stable-and-production-ready/>") }
) {
Text("Open inAppBrowser")
}
}
if (openDialog) {
Dialog(
onDismissRequest = { openDialog = false },
properties = DialogProperties(
dismissOnBackPress = true,
dismissOnClickOutside = true,
usePlatformDefaultWidth = true
)
) {
Box(
modifier = Modifier.fillMaxWidth()
.background(Color(0xFFFFFFFF))
.padding(40.dp)
) {
Text(
text = "Home Dialog"
)
}
}
}
}
PlatformInAppBrowserController.ios.kt
:
actual object PlatformInAppBrowserController {
private var lastPresentViewController: SFSafariViewController? = null
private val rootViewController: UIViewController?
get() = UIApplication.sharedApplication.keyWindow?.rootViewController
actual fun launch(url: String) {
val rootViewController = rootViewController ?: return
val viewController = NSURL.URLWithString(url)?.let { nsUrl -> SFSafariViewController(nsUrl) } ?: return
viewController.modalPresentationStyle = UIModalPresentationFullScreen
lastPresentViewController = viewController
rootViewController.presentViewController(
viewControllerToPresent = viewController,
animated = true,
completion = {},
)
}
}
Joel Denke
05/07/2025, 6:01 AMShivam Dhuria
05/07/2025, 9:08 AMUIKitViewController
. However, it always seems to add a White background to it. I understand there’s a active issue for it but is there a workaround for it?Sargun Vohra
05/10/2025, 6:16 AMw: KLIB resolver: The same 'unique_name=annotation_commonMain' found in more than one library: /Users/runner/work/maplibre-compose/maplibre-compose/lib/maplibre-compose/build/kotlinTransformedMetadataLibraries/commonMain/androidx.annotation-annotation-1.9.1-commonMain-WmoUwA.klib, /Users/runner/work/maplibre-compose/maplibre-compose/lib/maplibre-compose/build/kotlinTransformedMetadataLibraries/commonMain/org.jetbrains.compose.annotation-internal-annotation-1.8.0-commonMain-nX1O7g.klib
w: KLIB resolver: The same 'unique_name=collection_commonMain' found in more than one library: /Users/runner/work/maplibre-compose/maplibre-compose/lib/maplibre-compose/build/kotlinTransformedMetadataLibraries/nativeMain/androidx.collection-collection-1.5.0-commonMain-j7f1lg.klib, /Users/runner/work/maplibre-compose/maplibre-compose/lib/maplibre-compose/build/kotlinTransformedMetadataLibraries/nativeMain/org.jetbrains.compose.collection-internal-collection-1.8.0-commonMain-5vjmwQ.klib
> Task :lib:maplibre-compose:compileIosMainKotlinMetadata FAILED
Full CI log here: https://github.com/sargunv/maplibre-compose/actions/runs/14942414618/job/41981406361?pr=317#step:4:466
Looking at the dependency tree, it seems org.jetbrains.compose.collection-internal-collection-1.8.0 depends on androidx.collection-collection-1.5.0, and ditto for the annotation conflict, so sounds like this is likely to be a bug in Compose Multiplatform v1.8.0? Are there any workarounds?Mohammad Reza Najafi
05/11/2025, 5:44 AMShowing Recent Messages
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld invocation reported errors
/Users/StudioProjects/iosApp/ld:1:1: ignoring duplicate libraries: '-ldl', '-lz'
Undefined symbols for architecture arm64:
"_kfun:androidx.compose.runtime#androidx_compose_runtime_ProvidedValue$stableprop_getter$artificial(){}kotlin.Int", referenced from:
_kfun:com.slack.circuit.sharedelements#ProvideAnimatedTransitionScope(com.slack.circuit.sharedelements.SharedElementTransitionScope.AnimatedScope;androidx.compose.animation.AnimatedVisibilityScope;kotlin.Function3<com.slack.circuit.sharedelements.SharedElementTransitionScope?,androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>;androidx.compose.runtime.Composer?;kotlin.Int){} in libcircuit-root:circuit-shared-elements-cache.a[2](libcircuit-root:circuit-shared-elements-cache.a.o)
_kfun:com.slack.circuit.foundation#CircuitCompositionLocals(com.slack.circuit.foundation.Circuit;com.slack.circuit.retained.RetainedStateRegistry?;kotlin.Function2<androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>;androidx.compose.runtime.Composer?;kotlin.Int;kotlin.Int){} in libcircuit-root:circuit-foundation-cache.a[2](libcircuit-root:circuit-foundation-cache.a.o)
_kfun:com.slack.circuit.foundation#CircuitContent(com.slack.circuit.runtime.screen.Screen;com.slack.circuit.runtime.Navigator;androidx.compose.ui.Modifier?;com.slack.circuit.foundation.Circuit?;kotlin.Function4<com.slack.circuit.runtime.screen.Screen,androidx.compose.ui.Modifier,androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>?;kotlin.Any?;androidx.compose.runtime.Composer?;kotlin.Int;kotlin.Int){} in libcircuit-root:circuit-foundation-cache.a[2](libcircuit-root:circuit-foundation-cache.a.o)
_kfun:com.slack.circuit.foundation.RetainedStateHolderImpl.RetainedStateProvider#internal in libcircuit-root:circuit-foundation-cache.a[2](libcircuit-root:circuit-foundation-cache.a.o)
_kfun:com.slack.circuit.foundation.RetainedStateHolderImpl.RetainedStateHolderImpl$RetainedStateProvider$1.invoke#internal in libcircuit-root:circuit-foundation-cache.a[2](libcircuit-root:circuit-foundation-cache.a.o)
_kfun:com.slack.circuit.foundation.SaveableStateHolderImpl.SaveableStateProvider#internal in libcircuit-root:circuit-foundation-cache.a[2](libcircuit-root:circuit-foundation-cache.a.o)
ld: symbol(s) not found for architecture arm64
Colton Idle
05/12/2025, 8:50 PM