Closed MichaelRumpler closed 4 years ago
Did you add these into your LSApplicationQueriesSchemes? https://docs.microsoft.com/en-us/xamarin/essentials/launcher?context=xamarin%2Fxamarin-forms&tabs=ios#additional-platform-setup
No, I didn't see that. Thanks, that fixed the issue.
Why is that needed for the Launcher
, but not for Device.OpenUrl
?
To check "CanOpen" you must use those. You can launch without checking, which is what OpenUrl and OpenAsync does...
I have added the LSApplicationQueriesSchemes still same issue
Description
I open other apps via urls. Until recently I used
Device.OpenUrl
for that, but now that method is marked as obsolete.I tried to follow the warning and replace it with
Launcher.CanOpenAsync
andLauncher.OpenAsync
or withTryOpenAsync
, but the Can.. and Try.. methods always returnfalse
for uri schemes which are handled by third party apps. They only return true for some standard schemes like http, https and mailto.Steps to Reproduce
await Launcher.CanOpenAsync("ssh://...")
Expected Behavior
It returns true.
Launcher.OpenAsync
orLauncher.TryOpenAsync
start Termius.Actual Behavior
It returns false. Nothing is started.
Basic Information
Reproduction Link
Repro_Launcher.zip The sample app tries to open some urls which are handled by various third party apps. You can choose with the radio buttons at the top whether it uses the
Launcher
orDevice.OpenUrl
to open the urls so that you can verify that the url really works. I added some comments in MainPage.xaml.cs with the apps which handle the urls in question.