Posts

Post not yet marked as solved
0 Replies
409 Views
Hi, I have just found the weirdest behaviour in SwiftUI. Here is what happens: I have a view A which contains a NavigationView. From A the user can go to view B and from there to view C. In view C the user can enter data which updates a published property of an observable object to which views A, B and C link to via @Observed Object. On updating the published property view c just disappears, without any crash report, log message or anything (And the reason why I think it crashes is because the usual animation for going forward/backward is missing when it disappears). The app doesn't crash either and can be used normally, including going back to view C. If I remove the link to the observed object in view A OR if I remove some code from view A and put it into a separate view, then view C does not disappear when the published property is updated. The code I remove from view A uses another view which has a @ViewBuilder property. Removing the @ViewBuilder property also prevents the crash. Again, there is no crash report or anything. I don't have the time to produce non-NDA code for demonstration purposes, but has someone ever seen something like this? Best, Philip
Posted
by PhilipM.
Last updated
.
Post not yet marked as solved
1 Replies
527 Views
Hi, I feel like I receive the "compiler is unable to type-check" error much more often with the new XCode version (using SwiftUI). Even tiny changes provoke this error now. Does someone have a similar experience? Any ideas what can be done about it? Cheers, Philip
Posted
by PhilipM.
Last updated
.