static Task <bool> PlatformTryOpenAsync(Uri uri) { var nativeUrl = WebUtils.GetNativeUrl(uri); if (UIApplication.SharedApplication.CanOpenUrl(nativeUrl)) { return(PlatformOpenAsync(nativeUrl)); } return(Task.FromResult(false)); }
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)); }
static Task PlatformOpenAsync(Uri uri) => PlatformOpenAsync(WebUtils.GetNativeUrl(uri));
static Task <bool> PlatformCanOpenAsync(Uri uri) => Task.FromResult(UIApplication.SharedApplication.CanOpenUrl(WebUtils.GetNativeUrl(uri)));
internal static Task PlatformOpenAsync(Uri uri) => Task.FromResult(NSWorkspace.SharedWorkspace.OpenUrl(WebUtils.GetNativeUrl(uri)));
static Task <bool> PlatformCanOpenAsync(Uri uri) => Task.FromResult(NSWorkspace.SharedWorkspace.UrlForApplication(WebUtils.GetNativeUrl(uri)) != null);