I recommend not to go back to using UIKit. There is an interesting approach here. The solution is to use a model class that conforms to ObservableObject, and use @Published variables in the NavigationLink selection. Add willSet/didSet to these variables, and you will know when a selection was made.
willSet/didSet do not work on @State variables so using @Published variables does the trick.
A similar approach is also taken on this sample code by Apple.
Check out the comments of @App Store Connect Engineer’s reply above. They installed a fix so new uploaded builds will work. Others and I can confirm it does. For me deployment target 12.0 works on my iPhone 5s with App Store Release build (didn’t test builds for internal or development testing). Note it does not work if you install an .ipa locally, you need to upload the build for the fix to work.
I recommend not to go back to using UIKit. There is an interesting approach here. The solution is to use a model class that conforms to ObservableObject, and use @Published variables in the NavigationLink selection. Add willSet/didSet to these variables, and you will know when a selection was made.
willSet/didSet do not work on @State variables so using @Published variables does the trick.
A similar approach is also taken on this sample code by Apple.
Check out the comments of @App Store Connect Engineer’s reply above. They installed a fix so new uploaded builds will work. Others and I can confirm it does. For me deployment target 12.0 works on my iPhone 5s with App Store Release build (didn’t test builds for internal or development testing). Note it does not work if you install an .ipa locally, you need to upload the build for the fix to work.