diff --git a/src/Media.Plugin/iOS/MediaPickerDelegate.cs b/src/Media.Plugin/iOS/MediaPickerDelegate.cs index 0028bd19..1e9ed4d8 100644 --- a/src/Media.Plugin/iOS/MediaPickerDelegate.cs +++ b/src/Media.Plugin/iOS/MediaPickerDelegate.cs @@ -47,8 +47,12 @@ public UIPopoverController Popover public Task> Task => tcs.Task; + private bool isFinished; public override async void FinishedPickingMedia(UIImagePickerController picker, NSDictionary info) { + if (isFinished) + return; + isFinished = true; RemoveOrientationChangeObserverAndNotifications(); MediaFile mediaFile; @@ -77,6 +81,7 @@ public override async void FinishedPickingMedia(UIImagePickerController picker, tcs.SetException(new FileNotFoundException()); else tcs.TrySetResult(new List { mediaFile }); + isFinished = false; }); }