Hi <@UHAJKUSTU> I have a trouble with lables on io...
# mvikotlin
l
Hi @Arkadii Ivanov I have a trouble with lables on ios, when I publish Label on ios i have a crash
a
Hey! The issue is that you are freezing the Lifecycle which is not supposed to be frozen. Most likely at
kfun:ru.alekseikorshun.shared.store.TrainingStoreFactory.ExecutorImpl.executeIntent#internal
l
I understand, but I don’t do it
a
Looks like you have
observeOn(mainScheduler)
and subscribe without
threadLocal
flag
l
right now I don’t use observeOn/subscribeOn operators in the app
a
Can't say precisely without the code
l
moreover I don’t create subsciption in executor
it is executor
a
Right, I checked the stack trace more carefully, the freezing occurs somewhere down the
Store.labels
stream
Looks like there is a subscriber who freezes the
Lifecycle
l
ok I found a problem in my project, I had
store.labels.observeOn(mainScheduler) bindTo { trainingListener.onEnd(true) }
in my code and when I remove
observeOn
operator all fine now, but I think it isn’t correct
a
You can just remove
observeOn
Store emissions are guaranteed to be on the main thread
l
yaep, but I don’t find it in docs 😞 and it is not obviously
thx for help
a
It is in the KDocs, and also there is the annotation. Not sure if it is visible on your side. I will add it to the docs as well. Thanks!
Same information is in the main
Store
interface KDocs :-)
l
👍