Hello,
You could use Xamarin.Essentials: Launcher in Xamarin.Forms to open other apps via URI . In iOS 9 and greater, Apple enforces what schemes an application can query for. To specify which schemes you would like to use, you must specify LSApplicationQueriesSchemes
in your Info.plist
file.
<key>LSApplicationQueriesSchemes</key>
<array>
<string>XXX</string>
</array>
In Xamarin.iOS, you could use UIApplication.SharedApplication.OpenUrl(url);
. Optionally, the CanOpenUrl
method can be used to check if the URI schema can be handled by an application on the device: UIApplication.SharedApplication.CanOpenUrl(url);
For more details, refer to
https://developer.apple.com/documentation/uikit/uiapplication/1648685-openurl?language=objc
https://developer.apple.com/documentation/uikit/uiapplication/1622952-canopenurl?language=objc
------UPDATE------
You couldn't use Xamarin.Essentials.Browser
by this way : await Xamarin.Essentials.Browser.OpenAsync("lyft://ridetype?id=lyft_line");
From the source code, we can see that Xamarin.Essentials.Browser
uses SFSafariViewController to load the Uri and keep navigation awareness. But SFSafariViewController
provides a visible standard interface for browsing the web, the above URI is not a web URL.
Best Regards,
Wenyan Zhang
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.