Post

Replies

Boosts

Views

Activity

Reply to Xcode 16 - List Lazy loading broken
Hello I don't know if I arrive to late to the party but be aware that Apple has introduce a new settings that does some optimisation for previews but potentially breaks List lazy loading in debug. Basically since Xcode 16, Apple introduced a new execution engine for Previews with 30% improvements between edits and rendered previews. More technically, it does type erasing by wrapping your SwiftUI Views to AnyViews. Only in DEBUG. So this also comes at the cost of making your code less performant at runtime (besides breaking some List lazy loading optimization and others). But the other annoying thing is that you might get completely different behaviour between RELEASE/DEBUG where some code could be working fine in DEBUG but not being re-rendered when it should, and thus completely buggy in RELEASE... To turn this off, you can set this in your project (Build Settings for your target, Add User-Defined Setting) SWIFT_ENABLE_OPAQUE_TYPE_ERASURE=NO Don't know if this will help but at least you now have some more information on what could explain your issues.
4d