Skip to content

Fix MediaPicker and FilePicker returning null on cancellation#32656

Merged
jfversluis merged 6 commits intoinflight/currentfrom
copilot/fix-null-return-in-pickphotosasync
Dec 2, 2025
Merged

Fix MediaPicker and FilePicker returning null on cancellation#32656
jfversluis merged 6 commits intoinflight/currentfrom
copilot/fix-null-return-in-pickphotosasync

Conversation

Copy link
Contributor

Copilot AI commented Nov 16, 2025

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Description of Change

The iOS implementation of MediaPicker.PickPhotosAsync and PickVideosAsync violates the documented API contract by returning null instead of an empty list when the user cancels. Similarly, FilePicker.PickMultipleAsync returns null on cancellation on Android and Windows platforms. This causes NullReferenceException in user code that expects non-null collections per the documentation:

"When the operation was cancelled by the user, this will return an empty list/collection."

MediaPicker Changes:

Fixed iOS implementation to return [] instead of null in four code paths:

  • iOS < 14 early return
  • Presentation controller dismissal handler
  • Picker delegate completion with no results
  • Helper method null/empty results handling

FilePicker Changes:

Fixed Android and Windows platforms to return empty collections instead of null:

  • Android: FilePicker.android.cs - returns [] on OperationCanceledException
  • Windows: FilePicker.windows.cs - returns [] when no files selected
  • Documentation: Updated FilePicker.shared.cs XML documentation to reflect empty collection return behavior

Impact:

  • Both MediaPicker.PickPhotosAsync/PickVideosAsync now correctly return empty lists on cancellation (iOS)
  • FilePicker.PickMultipleAsync now correctly returns empty collections on cancellation (Android, Windows)
  • API contract is properly enforced across picker implementations
  • User code no longer needs null checks for these specific APIs, can safely use .Count, .Any(), LINQ operations, etc.

Example impact on user code:

var photos = await MediaPicker.Default.PickPhotosAsync(options);
// Before: photos could be null, requiring null check
// After: photos is always a list (empty if cancelled)
var count = photos.Count; // Safe - no longer throws NullReferenceException

var files = await FilePicker.Default.PickMultipleAsync(options);
// Before: files could be null on cancellation (Android, Windows)
// After: files is always an enumerable (empty if cancelled)
var anyFiles = files.Any(); // Safe - no null check needed

Issues Fixed

Fixes #32649
Fixes #32519

Original prompt

This section details on the original issue you should resolve

<issue_title>MediaPicker.PickPhotosAsync returns null in some cases</issue_title>
<issue_description>### Description

According to docs, PickPhotosAsync should never return null (empty collection if user has cancelled an operation).
Sometimes it does though.
I don't knwo how to reproduce this relyably, because it sometimes works, sometimes doesn't - for the same photo.

Steps to Reproduce

            var photoPickerOptions = new MediaPickerOptions
            {
                Title = R.SelectProfilePhoto,
                MaximumWidth = 200,
                SelectionLimit = 1,
                RotateImage = true,
                PreserveMetaData = true
            };

            var selectedPhotos = await MediaPicker.Default.PickPhotosAsync(photoPickerOptions);  // <<< NULL HERE
            var photo = selectedPhotos.FirstOrDefault();

ER:
selectedPhotos result has single item (or zero, if user has cancelled).

AR:
In some cases, selectedPhotos is null.

Link to public reproduction project repository

No response

Version with bug

10.0.10

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

iOS 16.7

Did you find any workaround?

No response

Relevant log output

```</issue_description>

## Comments on the Issue (you are @copilot in this section)

<comments>
</comments>

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits November 16, 2025 13:14
Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>
Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix PickPhotosAsync returning null in some cases Fix MediaPicker.PickPhotosAsync returning null on iOS Nov 16, 2025
Copilot AI requested a review from jfversluis November 16, 2025 13:19
Copilot AI added a commit to kubaflo/maui that referenced this pull request Nov 16, 2025
Co-authored-by: kubaflo <42434498+kubaflo@users.noreply.github.com>
Copilot AI added a commit to kubaflo/maui that referenced this pull request Nov 16, 2025
Co-authored-by: kubaflo <42434498+kubaflo@users.noreply.github.com>
@kubaflo
Copy link
Contributor

kubaflo commented Nov 16, 2025

PR Review: Fix MediaPicker.PickPhotosAsync returning null on iOS

PR: #32656
Issue: #32649
Reviewer: GitHub Copilot PR Review Agent
Date: 2025-11-16

Summary

PR correctly fixes API contract violation where PickPhotosAsync and PickVideosAsync returned null instead of an empty list when user cancelled the picker on iOS. Changes are minimal, focused, and align with documented behavior. Android and Windows already return empty lists correctly.

Code Review

API Contract Violation

The documented API contract (MediaPicker.shared.cs lines 32, 60) clearly states:

"When the operation was cancelled by the user, this will return an empty list."

Yet the iOS implementation had four code paths that violated this by returning null:

Changes Analysis

Change 1: iOS < 14 Early Return (Line 182)

// Before
if (!OperatingSystem.IsIOSVersionAtLeast(14, 0))
{
    return null;  // ❌ API contract violation
}

// After
if (!OperatingSystem.IsIOSVersionAtLeast(14, 0))
{
    return [];  // ✅ Returns empty list as documented
}

Why this works: On iOS < 14, multiple photo selection is unsupported. Returning empty list signals "no selection" rather than causing NullReferenceException.

Change 2: Presentation Controller Dismissal (Lines 162, 243)

// Before
PickerRef.PresentationController.Delegate = new PhotoPickerPresentationControllerDelegate
{
    Handler = () => tcs.TrySetResult(null)  // ❌ Null on swipe-to-dismiss
};

// After
PickerRef.PresentationController.Delegate = new PhotoPickerPresentationControllerDelegate
{
    Handler = () => tcs.TrySetResult([])  // ✅ Empty list on swipe-to-dismiss
};

Why this works: When user dismisses picker by swiping down (iOS gesture) or tapping outside (iPad), the presentation controller delegate fires. Previously returned null, now correctly returns empty list.

Note: This code path appears twice in the file - once in PhotoAsync (line 162) and once in PhotosAsync (line 243). Both were fixed.

Change 3: Helper Method Null/Empty Results (Lines 268-273)

// Before
var fileResults = results?
    .Select(file => (FileResult)new PHPickerFileResult(file.ItemProvider))
    .ToList() ?? [];

// After
// Handle empty or null results - return empty list instead of null
if (results == null || results.Length == 0)
    return [];

var fileResults = results
    .Select(file => (FileResult)new PHPickerFileResult(file.ItemProvider))
    .ToList();

Why this is better:

  • Makes null/empty handling explicit and early
  • Avoids unnecessary LINQ operations when results are null/empty
  • Clearer code intent with descriptive comment
  • Previous code already returned [] via null-coalescing, but now it's more robust

Change 4: Picker Delegate Completion (Line 505)

// Before
public override void DidFinishPicking(PHPickerViewController picker, PHPickerResult[] results)
{
    picker.DismissViewController(true, null);
    CompletedHandler?.Invoke(results?.Length > 0 ? results : null);  // ❌ Null on empty
}

// After
public override void DidFinishPicking(PHPickerViewController picker, PHPickerResult[] results)
{
    picker.DismissViewController(true, null);
    CompletedHandler?.Invoke(results?.Length > 0 ? results : []);  // ✅ Empty list
}

Why this works: When user taps "Cancel" button or selects nothing, results is either null or empty array. Now correctly passes empty list instead of null.

Code Quality

Minimal Changes: Only modified null returns to empty list returns
Consistent Pattern: Uses [] syntax throughout (C# 12 collection expression)
No Breaking Changes: Empty list is safer than null (no NullReferenceException)
Platform Consistency: Matches Android/Windows behavior
Comment Added: Documents why null check exists in PickerResultsToMediaFiles

Platform Comparison

Android Implementation (MediaPicker.android.cs):

if (androidUris?.IsEmpty ?? true)
{
    return [];  // ✅ Already correct
}

iOS Implementation Before PR:

return null;  // ❌ API contract violation

iOS Implementation After PR:

return [];  // ✅ Now matches Android

Edge Cases Analysis

Edge Case 1: User Swipe-to-Dismiss (iOS)

Before PR: Returns nullNullReferenceException in user code
After PR: Returns [] → Safe, user code: photos.Count == 0

Edge Case 2: User Taps Cancel Button

Before PR: Returns nullNullReferenceException in user code
After PR: Returns [] → Safe, user code: photos.Count == 0

Edge Case 3: User Taps Outside Picker (iPad)

Before PR: Returns nullNullReferenceException in user code
After PR: Returns [] → Safe, user code: photos.Count == 0

Edge Case 4: iOS < 14 Device

Before PR: Returns nullNullReferenceException in user code
After PR: Returns [] → Safe, indicates feature unsupported

Edge Case 5: Empty Selection (0 photos selected)

Before PR: Returns nullNullReferenceException in user code
After PR: Returns [] → Safe, distinguishable from "1 or more selected"

Edge Case 6: Rapid Cancel/Reopen

Scenario: User opens picker, cancels, opens again, cancels
Before PR: Each cancel returns null, each requiring null check
After PR: Each cancel returns [], safe without null checks

Edge Case 7: SelectionLimit = 1 vs Multiple

Scenario: User sets SelectionLimit = 1 or SelectionLimit = 3
Before PR: Cancel returns null for both
After PR: Cancel returns [] for both (consistent)

Impact on User Code

Before PR (Unsafe)

var photos = await MediaPicker.Default.PickPhotosAsync(options);
// ❌ CRASHES if user cancels - null reference exception
var count = photos.Count;

After PR (Safe)

var photos = await MediaPicker.Default.PickPhotosAsync(options);
// ✅ SAFE - empty list on cancel
var count = photos.Count;  // 0 if cancelled

Migration Path

User code that already has null checks will continue to work:

var photos = await MediaPicker.Default.PickPhotosAsync(options);
if (photos == null || photos.Count == 0)  // Still works, but null check now redundant
    return;

Testing Notes

Manual Testing Required: iOS simulator or device needed to test actual picker cancellation scenarios.

Test Scenarios:

  1. Open picker and swipe down (iOS dismiss gesture) → Should return empty list
  2. Open picker and tap Cancel → Should return empty list
  3. Open picker on iPad and tap outside → Should return empty list
  4. Select 0 photos and tap Done → Should return empty list
  5. Test on iOS < 14 device → Should return empty list (unsupported)

Test Code (included in Sandbox app):

var result = await MediaPicker.Default.PickPhotosAsync(options);

if (result == null)
{
    // BUG DETECTED: Should never be null
    ResultLabel.Text = "❌ BUG: Result is NULL";
}
else if (result.Count == 0)
{
    // CORRECT: Empty list on cancel
    ResultLabel.Text = "✅ CORRECT: Empty list";
}
else
{
    // SUCCESS: Photos selected
    ResultLabel.Text = $"✅ SUCCESS: {result.Count} photo(s)";
}

Potential Concerns

⚠️ None Identified

All changes are safe and improve robustness:

  • ✅ No breaking changes (empty list is safer than null)
  • ✅ No performance impact
  • ✅ No new dependencies
  • ✅ No platform-specific edge cases introduced
  • ✅ Matches documented API contract
  • ✅ Aligns with Android/Windows behavior

Related Code Paths

Other Methods NOT Modified (correctly already return null):

  • PickPhotoAsync (singular) - Documented to return null on cancel ✅
  • PickVideoAsync (singular) - Documented to return null on cancel ✅
  • CapturePhotoAsync - Documented to return null on cancel ✅
  • CaptureVideoAsync - Documented to return null on cancel ✅

Why the difference? The singular pick methods (PickPhotoAsync, PickVideoAsync) return FileResult? (nullable single result) and are documented to return null on cancel. The plural methods (PickPhotosAsync, PickVideosAsync) return List<FileResult> and are documented to return empty list on cancel.

This PR correctly only modifies the plural methods.

Documentation Review

API Documentation (MediaPicker.shared.cs)

PickPhotosAsync (Line 32):

/// <returns>A list of <see cref="FileResult"/> objects containing details of the 
/// picked photos. When the operation was cancelled by the user, this will return 
/// an empty list.</returns>
Task<List<FileResult>> PickPhotosAsync(MediaPickerOptions? options = null);

PickVideosAsync (Line 60):

/// <returns>A list of <see cref="FileResult"/> objects containing details of the 
/// picked videos. When the operation was cancelled by the user, this will return 
/// an empty list.</returns>
Task<List<FileResult>> PickVideosAsync(MediaPickerOptions? options = null);

PR Changes Match Documentation: Both plural methods now correctly return empty list on cancel

Recommendation

Approve with High Confidence

Rationale:

  1. Fixes Critical Bug: Prevents NullReferenceException in user code
  2. Minimal Risk: Changes only affect error/cancel paths
  3. Platform Consistency: Matches Android/Windows behavior
  4. API Contract Compliance: Aligns with documented behavior
  5. No Breaking Changes: Empty list is safer than null
  6. Well-Tested Code Paths: All four null return paths identified and fixed

Suggested Next Steps:

  1. ✅ Approve PR for merge
  2. 📝 Test on iOS simulator/device to verify behavior (maintainer)
  3. 📚 Consider adding unit tests for cancellation scenarios
  4. 🔍 Verify CI passes all automated tests

Additional Notes

Code Style

Uses C# 12 collection expression syntax ([]) consistently, which is:

  • ✅ Modern and concise
  • ✅ Consistent with existing codebase patterns
  • ✅ Type-safe and compiler-verified

Security Considerations

✅ No security concerns - changes only affect return values on cancel/error paths

Performance Impact

✅ No performance impact - empty list allocation is negligible and only occurs on cancel

Backward Compatibility

✅ Fully backward compatible - existing null checks will still work, but become redundant


Review Status: ✅ APPROVED
Confidence Level: High
Risk Level: Low
Testing: Code analysis complete; Manual iOS testing recommended for final verification

@Dreamescaper
Copy link

@copilot
Please note that the issue is not only that null is returned when user cancels the dialog, but also that null is returned when user has actually selected a photo.

@jfversluis
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@jfversluis jfversluis marked this pull request as ready for review November 20, 2025 12:55
Copilot AI review requested due to automatic review settings November 20, 2025 12:55
@jfversluis
Copy link
Member

@copilot make sure to also apply this to Android and Windows

Copy link
Contributor Author

Copilot AI commented Nov 20, 2025

@copilot make sure to also apply this to Android and Windows

Android and Windows already return empty lists correctly in all cancellation scenarios:

Android (MediaPicker.android.cs):

  • Line 254: return singleResult is not null ? [singleResult] : [];
  • Line 273: return []; (when androidUris is empty)
  • Line 438: return []; (when pickerIntent is null)
  • Line 518: return []; (on OperationCanceledException)

Windows (MediaPicker.windows.cs):

  • Line 127: return singleResult is null ? [] : [singleResult];
  • Line 152: return []; (when picker result is null)

The fix was only needed for iOS, which now matches the behavior of Android and Windows in commit 42b3196.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a bug in the iOS implementation of MediaPicker.PickPhotosAsync and PickVideosAsync where null was returned instead of an empty list when users cancelled the operation. This violates the documented API contract stating that cancellation should return an empty list. The fix ensures consistency with Android and Windows implementations.

Key Changes:

  • Replace four null return paths with empty list [] returns
  • Add explicit null/empty check in PickerResultsToMediaFiles helper method with early return
  • Update presentation controller dismissal handler and picker delegate to return empty lists

@jfversluis
Copy link
Member

@copilot address comments, also make sure the public API comment is correct, see #32519

Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Nov 20, 2025

@copilot address comments, also make sure the public API comment is correct, see #32519

Addressed review comments in commit 6d9cab7:

  • Updated comment to clarify API contract compliance
  • Removed trailing newline

The public API documentation is correct - both PickPhotosAsync (line 32) and PickVideosAsync (line 60) in MediaPicker.shared.cs specify "When the operation was cancelled by the user, this will return an empty list." which matches the implementation.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/dotnet/maui/issues/32519
    • Triggering command: curl -s REDACTED (http block)

If you need me to access, download, or install something from one of these locations, you can either:

@jfversluis
Copy link
Member

@copilot specifically https://github.com/dotnet/maui/blob/main/src/Essentials/src/FilePicker/FilePicker.shared.cs#L36 doesn't seem to be correct. It says "/// An IEnumerable of file picking result objects, or if picking was cancelled by the user."

Which is not (longer) the case. It will now return an empty collection, right? Update the comment and also the same on line https://github.com/dotnet/maui/blob/main/src/Essentials/src/FilePicker/FilePicker.shared.cs#L57 and https://github.com/dotnet/maui/blob/main/src/Essentials/src/FilePicker/FilePicker.shared.cs#L72

…f null on cancellation

Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Nov 20, 2025

@copilot specifically https://github.com/dotnet/maui/blob/main/src/Essentials/src/FilePicker/FilePicker.shared.cs#L36 doesn't seem to be correct. It says "/// An IEnumerable of file picking r...

Fixed in commit e26bb48:

  • iOS: FileSystem.ios.cs - returns [] instead of null when urls are null/empty
  • Android: FilePicker.android.cs - returns [] instead of null on cancellation
  • Windows: FilePicker.windows.cs - returns [] instead of null when no files selected
  • Updated FilePicker.shared.cs documentation (lines 36 and 72) to state "When the operation was cancelled by the user, this will return an empty collection." instead of returning null

@jfversluis
Copy link
Member

@copilot please undo the change in FileSystem.ios.cs

Copilot AI changed the title Fix MediaPicker.PickPhotosAsync returning null on iOS Fix MediaPicker and FilePicker returning null on cancellation Nov 20, 2025
Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Nov 20, 2025

@copilot please undo the change in [FileSystem.ios.cs](e26bb48#diff-0bf9b5e59a051776251785ce285450444dc6d2f263392f9b8...

Reverted the change to FileSystem.ios.cs in commit 8c3dfd0. The file now returns null as it did originally.

@jfversluis
Copy link
Member

/azp run MAUI-public

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jfversluis
Copy link
Member

/azp run MAUI-DeviceTests-public

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jfversluis jfversluis added this to the .NET 10.0 SR2 milestone Nov 24, 2025
@jfversluis jfversluis changed the base branch from main to inflight/current December 2, 2025 13:38
@jfversluis jfversluis merged commit 20d40e3 into inflight/current Dec 2, 2025
62 checks passed
@jfversluis jfversluis deleted the copilot/fix-null-return-in-pickphotosasync branch December 2, 2025 13:39
PureWeen pushed a commit that referenced this pull request Dec 3, 2025
* Initial plan

* Fix MediaPicker.PickPhotosAsync returning null on iOS

Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>

* Complete fix for MediaPicker null return issue

Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>

* Address PR review comments: update comment and remove trailing newline

Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>

* Fix FilePicker.PickMultipleAsync to return empty collection instead of null on cancellation

Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>

* Revert FileSystem.ios.cs change - keep original null return behavior

Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>
PureWeen pushed a commit that referenced this pull request Dec 3, 2025
* Initial plan

* Fix MediaPicker.PickPhotosAsync returning null on iOS

Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>

* Complete fix for MediaPicker null return issue

Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>

* Address PR review comments: update comment and remove trailing newline

Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>

* Fix FilePicker.PickMultipleAsync to return empty collection instead of null on cancellation

Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>

* Revert FileSystem.ios.cs change - keep original null return behavior

Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>
PureWeen pushed a commit that referenced this pull request Dec 3, 2025
* Initial plan

* Fix MediaPicker.PickPhotosAsync returning null on iOS

Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>

* Complete fix for MediaPicker null return issue

Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>

* Address PR review comments: update comment and remove trailing newline

Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>

* Fix FilePicker.PickMultipleAsync to return empty collection instead of null on cancellation

Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>

* Revert FileSystem.ios.cs change - keep original null return behavior

Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>
PureWeen pushed a commit that referenced this pull request Dec 3, 2025
* Initial plan

* Fix MediaPicker.PickPhotosAsync returning null on iOS

Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>

* Complete fix for MediaPicker null return issue

Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>

* Address PR review comments: update comment and remove trailing newline

Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>

* Fix FilePicker.PickMultipleAsync to return empty collection instead of null on cancellation

Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>

* Revert FileSystem.ios.cs change - keep original null return behavior

Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>
PureWeen pushed a commit that referenced this pull request Dec 3, 2025
* Initial plan

* Fix MediaPicker.PickPhotosAsync returning null on iOS

Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>

* Complete fix for MediaPicker null return issue

Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>

* Address PR review comments: update comment and remove trailing newline

Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>

* Fix FilePicker.PickMultipleAsync to return empty collection instead of null on cancellation

Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>

* Revert FileSystem.ios.cs change - keep original null return behavior

Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>
github-actions bot pushed a commit that referenced this pull request Dec 5, 2025
* Initial plan

* Fix MediaPicker.PickPhotosAsync returning null on iOS

Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>

* Complete fix for MediaPicker null return issue

Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>

* Address PR review comments: update comment and remove trailing newline

Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>

* Fix FilePicker.PickMultipleAsync to return empty collection instead of null on cancellation

Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>

* Revert FileSystem.ios.cs change - keep original null return behavior

Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>
@github-actions github-actions bot locked and limited conversation to collaborators Jan 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MediaPicker.PickPhotosAsync returns null in some cases Comment seemingly conflicts with return type. Neither makes sense.

5 participants