TEAM LICENSES: Save money and learn new skills through a Hacking with Swift+ team license >>

Day 72 error: Publishing changes from within view updates is not allowed

Forums > 100 Days of SwiftUI

So at the end of the lesson Paul talks about fixing an issue with the MainActor to remove a runtime warning within the XCode editor. That purple warning is gone, but the console is still showing this:

023-08-28 19:34:06.686661-0500 BucketList[91236:27012168] [SwiftUI] Publishing changes from within view updates is not allowed, this will cause undefined behavior. 2023-08-28 19:34:06.916105-0500 BucketList[91236:27013386] [VKDefault] Missing MeshRenderables for ground mesh layer for (4/4) of ground tiles. Tile debug info: (Key: 2.2.3.255 t:34 kt:0, Has mesh errors: 0, MeshInstance count: 3, PendingMaterial count: 3, Invisible MeshInstances count: 0 | Key: 2.3.3.255 t:34 kt:0, Has mesh errors: 0, MeshInstance count: 3, PendingMaterial count: 3, Invisible MeshInstances count: 0 | Key: 1.3.3.255 t:34 kt:0, Has mesh errors: 0, MeshInstance count: 3, PendingMaterial count: 3, Invisible MeshInstances count: 0 | Key: 1.2.3.255 t:34 kt:0, Has mesh errors: 0, MeshInstance count: 3, PendingMaterial count: 3, Invisible MeshInstances count: 0)

It all seems to work ok, but the "Publishing changes from within view updates is not allowed part.... what is actually happening?

3      

Actually I found another thread here that mentions this has to do a bug with MapKit and how it interacts. Seems to be an officially reported bug with IOS 16

https://developer.apple.com/forums/thread/718697

as an off topic question, is there a way to search the forums? I find that I have to manually go through and look for various topics... the search seems to search more of the HWS site but not the forum itself....

Anyway, I will not mark this as solved as I am not so sure it IS solved lol

3      

you ask

is there a way to search the forums?

if you look above the forum content there is the text field that says Search the Forums

3      

@NigelGee thank you! I feel STUPID hahha I had only seen the Search field just to the right of ot the About and HWS+ menu items.... so good to know... as Homer Simpson would say DOH!

3      

Hacking with Swift is sponsored by Superwall.

SPONSORED Superwall lets you build & test paywalls without shipping updates. Run experiments, offer sales, segment users, update locked features and more at the click of button. Best part? It's FREE for up to 250 conversions / mo and the Superwall team builds out 100% custom paywalls – free of charge.

Learn More

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.