My Swift project uses MVVM and I'm wondering what's a way of having a "ViewModel" for my AppDelegate, that could be accessed by all the other ViewControllers. I understand that the AppDelegate isn't really a ViewController to have its own ViewModel, if strictly following MVVM model all throughout the app.
I want to have a state for my whole app for when the user is logged out, downloading something, etc. Perhaps someday the "ViewModel" would have plenty more use.
Should I just have global variables for these statuses or is there a way I can have my AppDelegate have a viewModel
property, then let my ViewControllers access it? It just seems "less clean" for me having global objects that aren't constants (that's only what I feel).
I'm also using ReactiveCocoa 4, if that would be of any help.