FilePicker on MacCatalyst app is not working (occasionally)
See original GitHub issueDescription
FilePicker returns null as soon as it pops up, 8 out of 10 times. var result = await FilePicker.Default.PickAsync();
Steps to Reproduce
- Create a new .Net MAUI App on Mac in Visual Studio.
- In the MainPage.xaml.cs add the following (to the sample button handler OnCounterClicked:
var result = await FilePicker.Default.PickAsync();
if (result != null)
{
int u = 0;
}
- Put a breakpoint on the “if” statement and run the app.
- Click on the button on the sample app.
This should let you choose a file and the name should return in the result above. But instead it sometime just returns with the result null as soon as the dialog pops up.
If you don’t see the bug, try to restart the app, or rebuild it.
Link to public reproduction project repository
Version with bug
7.0 (current)
Last version that worked well
Unknown/Other
Affected platforms
macOS
Affected platform versions
macOS Ventura 13.3.1 x64
Did you find any workaround?
No response
Relevant log output
No response
Issue Analytics
- State:
- Created 4 months ago
- Reactions:1
- Comments:6
Top Results From Across the Web
File picker (Open and Save Panel) not working
Hello All, since last few weeks , all of sudden i am finding the File picker in Open and save panel getting stuck....
Read more >Mac Catalyst app won't launch in Xcode
I'm building an app for deployment on iPhone, iPad and Mac Catalyst. I am using Automatic Code Signing. Project build without a single ......
Read more >2022 - Dave's Tech Blog
NET MAUI on Android, iOS, Mac Catalyst, and Windows. The main problem with my implementation was that the FilePicker for picking local audio...
Read more >.NET Maui FilePicker results in This platform does not ...
I am building a desktop app in .NET Maui which targets Windows and MacOS. When using the built-in FilePicker on Mac (Catalyst) I...
Read more >Mono interpreter on iOS and Mac Catalyst - .NET MAUI
Learn how to enable the Mono interpreter, which lets you use dynamic code generation in your .NET MAUI iOS and ARM64-based Mac Catalyst...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
There is a duplicate bug I just found: https://github.com/dotnet/maui/issues/11088
Thanks for the link, however I tried this but gives me the filename not the full path to the file and its no longer supported as per the issue that also mentions this problem. Did you have this issue?
UPDATE:
I forked that repro and fixed it [tested via TestFlight], forked version here:
https://github.com/brightertools/MauiFilePicker