I'm using the latest Microsoft Clarity iOS SDK in ...
# multiplatform
v
I'm using the latest Microsoft Clarity iOS SDK in a Compose Multiplatform app. Clarity works correctly on Android. On iOS, Clarity records the session and captures clicks, but the actual Compose UI is completely white in the recording. I've verified that Clarity itself is working by temporarily replacing my ComposeView() with native SwiftUI: VStack { Text("Clarity Test") Button("Test") { print("clicked") } } The native SwiftUI content appears correctly in the Clarity recording, but the Compose Multiplatform content does not. My iOS hierarchy is essentially: SwiftUI App → UIViewControllerRepresentable → ComposeUIViewController → Compose Multiplatform UI Has anyone successfully used Microsoft Clarity's iOS SDK with Compose Multiplatform? Is there any configuration or workaround required for Clarity to capture the Compose/Skia-rendered surface on iOS? I'm using the latest Clarity iOS SDK
a
Compose Multiplatform uses IOSurfaces to display context - which is low-level iOS API. As far as I remember, its content won't be captured via layers API, like
layer.render(in:)
. We're using view.drawViewHierarchyInRect() in put tests to capture the surface content. As the
Clarity
does not provide source code, I cannot say exactly why it's happening, but the symptoms are quite close to what may happened if they're using wrong method to capture UI state. To debug the problem, could you please check if
Clarity
can capture other Metal-based components, like MKMapView?
v
I tested this with
MKMapView
. The result is: • Native SwiftUI content → captured correctly •
MKMapView
→ the map area is gray in the Clarity recording • Compose Multiplatform → white in the Clarity recording So it looks like Clarity is also unable to capture the rendered content of
MKMapView
, while it can capture the surrounding native SwiftUI hierarchy. Would
drawViewHierarchyInRect()
be expected to capture `MKMapView`/IOSurface content in this situation, or would the capture implementation need to access the underlying IOSurface directly?
a
drawViewHierarchyInRect
is used in our tests to verify the content drawn by Compose. So, switching to this API should solve the issue.