Answer the question
In order to leave comments, you need to log in
Xamarin widgets for iOS, passing new parameters to a collapsed app possible?
The situation is this. If you call the application from the widget via ExtensionContext?.OpenUrl with parameters, then the application that is not running starts via AppDelegate where in the OpenUrl method I accept and process the parameters. If you return to the widget and call this application (which is minimized) again (but with a different parameter), then the application simply expands and, naturally, initialization in the AppDelegate does not occur.
The question is how to pass parameters from the widget with guarantee?
Answer the question
In order to leave comments, you need to log in
I'm answering myself, in case it's useful to someone.
It turns out there are two OpenUrl methods in AppDelegate, I chose
OpenUrl(UIApplication application, NSUrl url, NSDictionary options)
instead of OpenUrl(
UIApplication
application, NSUrl url, string sourceApplication, NSObject annotation)
OpenUrl is still called again, and there it is already a matter of technology (getting new parameters from the widget)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question