I’m trying to implement a function to capture and attach a picture in .NET MAUI. It seems to be correctly working on all platforms but MAC Catalyst. The issue seems to be the FullPath property of the FileResult (Microsoft.Maui.Storage) object returned by MediaPicker.Default.CapturePhotoAsync(). While on Android I can get the entire virtual path (filename included), MAC Catalyst just returns a file with this pattern [guid].png with no path at all.
After I capture the picture I use FileInfo.CopyTo in order to copy my picked picture into a cache folder that is under my control. Everything on Android works like a charm, while on MAC Catalyst, since I do not have any correct path, copying the file throws an exception.
How can I get the right path in this platform?
from the docs
The FullPath property doesn't always return the physical path to the file. To get the file, use the OpenReadAsync method.