Navigation Link limitations inside a group in swiftui iphone

Within the emulator , i can add an huge number of navigation links inside a group or any kind of stack Same code that runs well on the emulated phone crashes on real phone when the number of navigation links is too high ( like 40/50) inside on Stack . The same links work fine if i don t put everything in one stack but inside several . It was hard to realize it but now i think that i can handle links in my app . However , with the 10 elements limitation inside one stack, it means that it wouldn t be possible to have 500 links (on a real phone) . Would like to know if someone knows anything about it and why only in a real phone

Btw , my app is very large, hence the important number of navigation links that can not be replaced by anything else

The limitation to 10 is effectively a very serious limitation of SwiftUI.

But you can use Group and even Groups in Groups or Groups of Groups of Groups !

So the number of items is unlimited in fact

Note : the forum does not accept the following text presented as code, so I paste a file.

Error @main is not where the error occurs in fact.

Did you try to list links in a ForEach loop ? May be it will clear the 50 limit (that I read in another post, but cannot find back).

As described here: https://stackoverflow.com/questions/65910518/swiftui-10-view-limit

Navigation Link limitations inside a group in swiftui iphone
 
 
Q