vivek gupta
08/20/2026, 1:40 AMAndrei Salavei
09/09/2026, 8:54 AMlayer.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?vivek gupta
09/10/2026, 7:31 AMMKMapView.
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?Andrei Salavei
09/14/2026, 11:40 AMdrawViewHierarchyInRect is used in our tests to verify the content drawn by Compose. So, switching to this API should solve the issue.