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

Commit

Permalink
Merge pull request #1734 from AndyG74/patch-1
Browse files Browse the repository at this point in the history
Update MediaPicker.ios.cs
  • Loading branch information
Redth authored Jul 12, 2021
2 parents 5bc7af0 + 2980ea3 commit 1ef03fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Xamarin.Essentials/MediaPicker/MediaPicker.ios.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ static async Task<FileResult> PhotoAsync(MediaPickerOptions options, bool photo,
if (!UIImagePickerController.AvailableMediaTypes(sourceType).Contains(mediaType))
throw new FeatureNotSupportedException();

if (!photo)
if (!photo && !pickExisting)
// microphone only needed if video will be captured
await Permissions.EnsureGrantedAsync<Permissions.Microphone>();

// Check if picking existing or not and ensure permission accordingly as they can be set independently from each other
Expand Down

0 comments on commit 1ef03fb

Please sign in to comment.