Answer the question
In order to leave comments, you need to log in
Xamarin widgets for iOS8, passing parameters to app possible?
Making a widget for the application, I found that the parameters in ios 8 are not transferred, if the system version is higher, then everything is ok.
I pass parameters like this:
ExtensionContext?.OpenUrl("MyApp://?param=value", (bool success) => {
if (!success) InfoLabel.Text = "Не удаётся открыть приложение!";
} );
public override bool OpenUrl(UIApplication app, NSUrl url, NSDictionary options)
{
string[]
UriParams = url.RelativeString.Split('?'),
ParamsVal = UriParams?.Length > 1 ? UriParams[1].Split('=') : null;
Instance.WidgetAction = ParamsVal?.Length > 1
? ParamsVal[1]
: string.Empty;
} ;
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 that there are two OpenUrl methods in the AppDelegate, I chose unsuccessfully
instead of
In this case, the parameters are passed correctly.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question