-
Notifications
You must be signed in to change notification settings - Fork 750
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues related to parameters passed through URI protocol activation #19161
Comments
The URL component is provided to the app through See this part: uno/src/Uno.UI/UI/Xaml/Application.iOS.cs Lines 59 to 69 in 8d836a8
|
Many thanks, I now have a solution based on overriding FinishedLaunching like so:
However, I am still running into these issues:
Any help on this would be welcome as well. |
I don't think there's anything specific related to the url launching and any failure to continue at this time.
At this time, there isn't that I know of. This was a feature that was supported by VS for mac at some point (the app can wait for the debugger to start), but it's not available in VS nor VS Code. |
OnLaunched hasn't done this at all, hence use a workaround using Environment.GetCommandLineArgs() on Windows. Since this didn't provide any arguments on iOS I built another workaround overriding FinishedLaunching() based on your answer. However, even here the behaviour on a physical device is as described above under 1. The only LaunchOption is '[UIApplicationLaunchOptionsURLKey, app://?param=hello]' and is only present when the app is started from scratch, not when already running. As for the rest, I almost feared so, but thanks for the input anyway. |
Current behavior
Given the outdated documentation for UWP, I couldn't get URI activation to work with WinUI as the ActivationKind was never Protocol and the arguments empty:
Instead I settled for searching the parameter in the envrionment arguments:
While URI launch itself works on Windows and iOS (haven't tested Android), the parameter is never present on iOS.
Is there a workaround I can use to have any given parameter to be actually present?
Example URI:
appuri://?param=test
PS: I also noticed that URI activation leads to an app freeze immediately after the splashscreen if the app isn't currently running, which requires navigation from and back to the app once to make it work. This might be on my end though; I am still investigating.
Expected behavior
URI activation causes parameters to be present.
How to reproduce it (as minimally and precisely as possible)
No response
Workaround
none
Works on UWP/WinUI
None
Environment
Uno.WinUI / Uno.WinUI.WebAssembly / Uno.WinUI.Skia
NuGet package version(s)
5.6.0-dev.1235
Affected platforms
iOS
IDE
Visual Studio 2022
IDE version
17.12.3
Relevant plugins
No response
Anything else we need to know?
No response
The text was updated successfully, but these errors were encountered: