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

Update MediaPicker.ios.cs #1734

Merged
merged 2 commits into from
Jul 12, 2021
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
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