Skip to content
This repository was archived by the owner on May 15, 2024. It is now read-only.
Merged
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
6 changes: 2 additions & 4 deletions Xamarin.Essentials/FilePicker/FilePicker.ios.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ public static partial class FilePicker
{
static Task<IEnumerable<FileResult>> PlatformPickAsync(PickOptions options, bool allowMultiple = false)
{
if (allowMultiple && !Platform.HasOSVersion(11, 0))
throw new FeatureNotSupportedException("Multiple file picking is only available on iOS 11 or later.");

var allowedUtis = options?.FileTypes?.Value?.ToArray() ?? new string[]
{
UTType.Content,
Expand All @@ -29,7 +26,8 @@ static Task<IEnumerable<FileResult>> PlatformPickAsync(PickOptions options, bool
// while opening (UIDocumentPickerMode.Open) opens the document directly. We do the
// latter, so the user accesses the original file.
var documentPicker = new UIDocumentPickerViewController(allowedUtis, UIDocumentPickerMode.Open);
documentPicker.AllowsMultipleSelection = allowMultiple;
if (Platform.HasOSVersion(11, 0))
documentPicker.AllowsMultipleSelection = allowMultiple;
documentPicker.Delegate = new PickerDelegate
{
PickHandler = urls =>
Expand Down