I'm looking to implement scene restoration and wanted to make sure that I have the right idea on how to approach this. Currently, my application supports multiple windows but every subsequent scene after the first doesn't have its UI set up (only shows an empty tab bar controller).
I thought that this could be one of two causes:
AppDelegate needs to be called: My first scene configures the UI correctly, but stepping through the debugger for subsequent scenes shows that a class that configures the UI is not called. Perhaps this is an issue with how my project is set up.
Scene restoration: But, I don't have scene restoration implemented AFAIK and think that this might be an issue. I found these resources: https://developer.apple.com/documentation/uikit/uiscenedelegate/supporting_multiple_windows_on_ipad and https://www.kairadiagne.com/2019/11/20/state-restoration-with-nsuseractivity.html and https://github.com/Ranchero-Software/NetNewsWire/blob/main/iOS/SceneDelegate.swift where there is a separate function that sets particular UI components based on NSUserActivity properties. I have a lot of different views in my application each with a lot of different components and don't think that I could set a property for every view and their respective components, unless I actually have to only add very few identifiers. Let me know if I am on the right track with that idea, looking for suggestions here.
Best case scenario would be that my issue is the 1st one and I have to figure out how to move my project around. But in the worst case scenario, want to know how I would approach adding things to NSUserActivity given that I am working with a very dynamic application.