Nikhil Devgire –– Works fine for me! Can you share a screenshot of the error?
In the last couple of my client projects, I have been following the exact same approach i.e. using enums+protocols! This one time I had to move from GA to Mixpanel and it didn’t effect my controllers at all which was such an amazing feeling :)
It’s fine if you like them but when I use them I see too much code, too much abstraction, more maintainabilty. I have seen the implementations but sorry it doesn’t look good to me. As I said I’m happy with MVVM & protocols. They are enough to decouple my views, make my controllers reusable and testable.
Hey, even though we can‘t declare a property like you mentioned above but the way I use it is make your `ViewModel` conform with your `DataProvider` and satisfy all the requirements. This way you won’t need to save a direct reference of DataProvider but rather save a reference of your ViewModel which conforms to DataProvider. I hope I made it clear and it helps :)