Hello,
we have been using the SwiftUI Label
with the Family Controls tokens (ApplicationToken
, ActivityCategoryToken
- https://developer.apple.com/documentation/swiftui/label/init(_:)-39rkz)
And noticed that sometimes (quite rarely) the loading of the labels would take so long that it would freeze the entire app. Unfortunately as this only happened to our users (few times during user interviews) we aren't able to reproduce it on our devices and profile it.
My guess is that this "mapping" of tokens to images happens entirely on the UI thread because it is supposed to be fast but sometimes there is huge delay and everything freezes.
It would be great if the labels were somehow "prepared" on the background and the Label
view would perhaps show some sort of loading and then get updated with the image of the app or category.
This freezing was happening even when our app showed at most six labels on the screen.
We tried some workarounds, namely to render the Label
components in a backround and then use it as an image but instead of app icons we got yellow squares with red cross - probably due to privacy reasons.
Anyone run into this issue? Any solutions?