From 50df1aea9c4a2c7427a84c5b66a5bd1c7cea31eb Mon Sep 17 00:00:00 2001 From: Timm Preetz <52437+tp@users.noreply.github.com> Date: Wed, 29 Apr 2020 20:12:21 +0200 Subject: [PATCH] Add note that `canLaunch` only works for some schemes And that some configuration is necessary to support custom schemes. --- packages/url_launcher/url_launcher/lib/url_launcher.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/url_launcher/url_launcher/lib/url_launcher.dart b/packages/url_launcher/url_launcher/lib/url_launcher.dart index 97af77143936..d27c7fba4732 100644 --- a/packages/url_launcher/url_launcher/lib/url_launcher.dart +++ b/packages/url_launcher/url_launcher/lib/url_launcher.dart @@ -101,6 +101,11 @@ Future launch( /// Checks whether the specified URL can be handled by some app installed on the /// device. +/// +/// On iOS 9.0 and later this only works for non-standard URL schemes if those are +/// declared in your app's `Info.plist` file under the `LSApplicationQueriesSchemes` key +/// For more details see: +/// https://developer.apple.com/documentation/uikiAndt/uiapplication/1622952-canopenurl Future canLaunch(String urlString) async { if (urlString == null) { return false;