Skip to content
This repository was archived by the owner on May 15, 2024. It is now read-only.

GH-1102 Fix launcher on older devices #1120

Merged
merged 2 commits into from
Feb 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Xamarin.Essentials/Browser/Browser.ios.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ static async Task<bool> PlatformOpenAsync(Uri uri, BrowserLaunchOptions options)
await vc.PresentViewControllerAsync(sfViewController, true);
break;
case BrowserLaunchMode.External:
if (Platform.HasOSVersion(12, 0))
if (Platform.HasOSVersion(10, 0))
{
return await UIApplication.SharedApplication.OpenUrlAsync(nativeUrl, new UIApplicationOpenUrlOptions());
}
Expand Down
7 changes: 6 additions & 1 deletion Xamarin.Essentials/Launcher/Launcher.ios.tvos.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ static Task<bool> PlatformTryOpenAsync(Uri uri)
var canOpen = UIApplication.SharedApplication.CanOpenUrl(nativeUrl);

if (canOpen)
return UIApplication.SharedApplication.OpenUrlAsync(nativeUrl, new UIApplicationOpenUrlOptions());
{
if (Platform.HasOSVersion(10, 0))
return UIApplication.SharedApplication.OpenUrlAsync(nativeUrl, new UIApplicationOpenUrlOptions());

UIApplication.SharedApplication.OpenUrl(nativeUrl);
}

return Task.FromResult(canOpen);
}
Expand Down