Hello again my compose multiplatform ios app sometimes ui freezing when I call http request in the viewModel but same code is working fine in android. How I can fix this problem?
k
Karan Sharma
03/06/2025, 12:42 PM
Ios app will be much larger compared to android because google play optimises bundle also ios binary needs to package SKIA library for rendering UI which is not required on android.
s
Shageldi Alyyev
03/06/2025, 12:47 PM
This problem maybe fix direct export to swift instead of obj-c when by default in kotlin multiplatform. Flutter also use SKIA but, CMP is more bigger size around 10-20 MB on iOS. But no problem on android side everything is fine, even better than flutter.
a
Andrei Salavei
03/07/2025, 6:33 AM
Hi! Could you please profile your app with the Timing Instrument and share the metrics?
s
Shageldi Alyyev
03/07/2025, 6:38 AM
Hi Andrei Salavei! I found my error, UIKitView freezing my UI:
Shageldi Alyyev
03/07/2025, 6:38 AM
Copy code
Main thread blocked by synchronous property query on not-yet-loaded property (assetProperty_MediaPlaybackValidation) for HTTP(S) asset. This could have been a problem if this asset were being read from a slow network.
Main thread blocked by synchronous property query on not-yet-loaded property (assetProperty_MediaPlaybackValidation) for HTTP(S) asset. This could have been a problem if this asset were being read from a slow network.
-[AVAssetTrack loadValuesAsynchronouslyForKeys:completionHandler:] invoked with unrecognized keys (
"currentVideoTrack.preferredTransform"
).