SwiftUI back button broken

When I start a View, and inmediatily after I execute a NavigationLink programmatically,


The back button stop working.

It also overlaps with the view title.


I fixed that "overlap", but the back button is still not working.


For more details:

- In app delegate I´m using FCM for push notifications. There I have my EnviromentObject that "controls" the app.

- When a notification is clicked, the apps shows the "Home" view.

- When a notification with a specific category is clicked. Then it shows the "Home" view, and inmediatly executes a navigationlink to the View where that kind of notifications are seen.

- There the back button is broken. But just when the push notification is clicked while you are outside the "Home" view.


Tested on iOS 13.4.1 and Xcode Version 11.4.1

What is FCM ? That may speak to you, but not to everyone.


Better than paraphrasing your code, would be better to show the code itself, because that's most likely where the error is.


You wrote:

  1. The back button stop working.
  2. It also overlaps with the view title.
  3. I fixed that "overlap", but the back button is still not working.


As 3 solves 2, no need to ask. Was it an error of yours or did you have to get around a SwiftUI problem ?

For 1: stop working: what do you get ?

For reference in case anyone else wonders, FCM stands for Firebase Cloud Messaging.

Thanks for decoding. I am a partisan of YSNUA policy (You Should Not Use Acronyms) 😁

SwiftUI back button broken
 
 
Q