예제 #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));
        }
예제 #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));
        }
예제 #3
0
 static Task PlatformOpenAsync(Uri uri) =>
 PlatformOpenAsync(WebUtils.GetNativeUrl(uri));
예제 #4
0
 static Task <bool> PlatformCanOpenAsync(Uri uri) =>
 Task.FromResult(UIApplication.SharedApplication.CanOpenUrl(WebUtils.GetNativeUrl(uri)));
예제 #5
0
 internal static Task PlatformOpenAsync(Uri uri) =>
 Task.FromResult(NSWorkspace.SharedWorkspace.OpenUrl(WebUtils.GetNativeUrl(uri)));
예제 #6
0
 static Task <bool> PlatformCanOpenAsync(Uri uri) =>
 Task.FromResult(NSWorkspace.SharedWorkspace.UrlForApplication(WebUtils.GetNativeUrl(uri)) != null);