I'm working on an app that gets Remote Background Fetch (aka. Silent Notification).
What I do, is resolving services with Mvx.Resolve that does the fetching over the network. It's working fine when the app have been launched and put into the background - But since it's not a guaranty that it stays there (low memory or people force closing all backgrounded apps), and MvvmCross therefore is not initialized anymore, I need to initialize it when the app gets woken up.
But I can't seem to just run Setup() and setup.Initialize() at that time, since the Setup constructor requires a UIWindow (witch will be null, when launched in the background) and parsing null, will throw an exception.
I'm aware that Android have a singleton class, that can ensure that MvvmCross is available, like this:
var setupSingleton = MvxAndroidSetupSingleton.EnsureSingletonAvailable(this);
setupSingleton.EnsureInitialized();
but I can't seem to find anything like this, on the iOS platform. The Setup class have a method EnsureInitialized(), but that still requires me to go though the Setup constructor, that requires a UIWindow, as mentioned before.
Can anyone tell me way to do this? One solution is to just manually initialize the services needed. But that seem like a bad solution, since some services may require other services to be loaded though MvvmCross Ioc.
Thanks