Yes, UI API can only be called on the main thread.
This error occurred at the very beginning when you initialize the label.
So before you code ran up here, had you executed your code in background?
Topic:
Programming Languages
SubTopic:
Swift
Tags: