Skip to main content
Andrew Fletcher
29 Dec 2020
The purple warning notification of annoyance recently came my way!  I received the following warning: Publishing changes from background threads is not allowed; make sure to publish values from the main thread (via operators like receive(on:)) on model updates.   What was happening? The functionality of the code uses URLSession to get a user's name via API and the display is simple piece that initially message of Hello {user}. The view code consists of: MainView : View Main :...