Hi,
I am a new SwiftUI app developer and developing my first application. In the process of designing not very GUI rich app, I noticed my app crashed whenever I switched orientation (testing on multiple iPhone devices).
After going through all kind of logs and errors, performance enhancements nothing worked.
Then I started rolling back all GUI related features 1 by 1 and tested (I am sure there are better approaches, but excuse me I am novice in app development :) ).
Even though it's time consuming, I could pin point the cause of the fatal error and app crash, it's due to multiple .shadow modifiers I used on NavigationLink inside a ForEach look (to be precise I used it like following,
.shadow(radius: 15)
.shadow(radius: 20)
.shadow(radius: 20)
.shadow(radius: 20)
.shadow(radius: 20)
Note, there are only 7 items in List and it uses the Hero View (like app store's Today section) for child views.
Once I got rid of shadow modifies or used only 1 app works fine and doesn't crash.
Lesson learnt...
P.S.
It's so ironic that so performance tuned devices couldn't handle this basic GUI stuff.