I am conditionally showing / hiding a NSViewControllerRepresentable, and it seems the life cycle methods of the NSViewController are not called correctly:
Here is a full example: GitHub - paxos/LifeCycleBug
viewDidAppear viewDidDisappear viewDidAppear viewDidDisappear ...
But what I see:
Output on 10.15.7:
viewDidAppear viewDidDisappear viewDidDisappear viewDidAppear viewDidAppear ...
As mentioned, this seem to be resolved on Big Sur.
Does anyone know any good work arounds?