Exemplo n.º 1
0
        static Task <bool> PlatformTryOpenAsync(Uri uri)
        {
            var nativeUrl = WebUtils.GetNativeUrl(uri);

            if (UIApplication.SharedApplication.CanOpenUrl(nativeUrl))
            {
                return(PlatformOpenAsync(nativeUrl));
            }

            return(Task.FromResult(false));
        }
Exemplo n.º 2
0
        static Task <bool> PlatformTryOpenAsync(Uri uri)
        {
            var nativeUrl = WebUtils.GetNativeUrl(uri);
            var canOpen   = NSWorkspace.SharedWorkspace.UrlForApplication(nativeUrl) != null;

            if (canOpen)
            {
                return(Task.FromResult(NSWorkspace.SharedWorkspace.OpenUrl(nativeUrl)));
            }

            return(Task.FromResult(canOpen));
        }
Exemplo n.º 3
0
 static Task PlatformOpenAsync(Uri uri) =>
 PlatformOpenAsync(WebUtils.GetNativeUrl(uri));
Exemplo n.º 4
0
 static Task <bool> PlatformCanOpenAsync(Uri uri) =>
 Task.FromResult(UIApplication.SharedApplication.CanOpenUrl(WebUtils.GetNativeUrl(uri)));
Exemplo n.º 5
0
 internal static Task PlatformOpenAsync(Uri uri) =>
 Task.FromResult(NSWorkspace.SharedWorkspace.OpenUrl(WebUtils.GetNativeUrl(uri)));
Exemplo n.º 6
0
 static Task <bool> PlatformCanOpenAsync(Uri uri) =>
 Task.FromResult(NSWorkspace.SharedWorkspace.UrlForApplication(WebUtils.GetNativeUrl(uri)) != null);