-
Notifications
You must be signed in to change notification settings - Fork 711
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash in FileUtils:resolveType
when UTTypeCreatePreferredIdentifierForTag
returns NULL
#1040
Comments
Hum, interesting. Does this happen on a real device? |
Just tried it on an iPhone and the crash does not happen there. I worded the issue a bit incorrect. |
After googling a bit, I found basically the same issue in another project, and it seems to be Apple Silicon related. |
I had that idea as well — that it was related with M1 issues on simulators. Unless it happens directly on real devices, this is low priority (if there is something that can actually be done or it should be fixed in a near future). |
I think a fix is pretty simple. Just handle the case where |
Ok feel free to do it! Don't forget to also increase the patch version as well update the CHANGELOG. Thank you! |
flutter_file_picker/ios/Classes/FileUtils.m
Lines 52 to 54 in 5b9dc6e
FileUtils:resolveType
does not expectUTTypeCreatePreferredIdentifierForTag
to returnNULL
but that is what is returned when a file extension is not a known tag class.Using
json
, for example, inallowedExtensions
andtype: FileType.custom
causes a crash on iOS Simulator.The text was updated successfully, but these errors were encountered: