Skip to content
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

App crashes on ios 10.3.3 #86

Closed
isaLima21 opened this issue May 28, 2019 · 15 comments
Closed

App crashes on ios 10.3.3 #86

isaLima21 opened this issue May 28, 2019 · 15 comments
Labels
bug Something isn't working
Milestone

Comments

@isaLima21
Copy link

App crashes when trying to pick a document with FileType.ANY. I have already enabled icloud and cloudkit as shown in the image attached.

The error I get is this:

2019-05-28 10:57:44.467621-0300 Runner[337:25602] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[FilePickerPlugin documentPicker:didPickDocumentAtURL:]: unrecognized selector sent to instance 0x17d7f6a0'

Captura de Tela 2019-05-28 às 11 05 09

@miguelpruivo
Copy link
Owner

Hi @IsaNascimento, which iOS version are you building on? Also, can you try enabling iCloud Documents?

Thank you.

@isaLima21
Copy link
Author

Hi @miguelpruivo I am on IOS 10.3.3. I tried enabling iCloud Documents, got the same error.

@miguelpruivo
Copy link
Owner

Do you even see the File Picker opening or you get the immediate exception? I know that for iOS versions below 11 you need to have the CloudKit enabled.

@isaLima21
Copy link
Author

I see it opening and I can navigate it but as soon as I click to "choose" a file, it closes, I get that exception and the app crashes or freezes.

@miguelpruivo
Copy link
Owner

I may have to take a look on this. Thank you for reporting.

@miguelpruivo miguelpruivo added the bug Something isn't working label May 28, 2019
@miguelpruivo miguelpruivo added this to the 1.4.0 milestone May 28, 2019
@isaLima21
Copy link
Author

@miguelpruivo just to let you know, I tried with a clean project (your example project) and the same thing happens.

@miguelpruivo
Copy link
Owner

@IsaNascimento that may be possible. I confess that I've not digging much about running it on versions below 11.0 because I don't even have CloudKit enabled.

@miguelpruivo
Copy link
Owner

I'm looking into it @IsaNascimento. I'll keep you updated.

@isaLima21
Copy link
Author

Alright, thank you @miguelpruivo.

@miguelpruivo
Copy link
Owner

@IsaNascimento I've found the issue and have already fixed it. I'm going to deploy a new version in a while.

@isaLima21
Copy link
Author

That's great @miguelpruivo! Thank you so much! Also, what was the issue? I was starting to debug your code to try to help but obj-c isn't really my thing.

@miguelpruivo
Copy link
Owner

@IsaNascimento it was due to not having the correct delegate for the iCloud Drive in versions below iOS 11.

Can you please confirm that is working properly by replacing your file_picker dependency in the pubspec pointing to beta?

  file_picker:
    git:
      url: https://github.com/miguelpruivo/plugins_flutter_file_picker.git
      ref: beta

If everything is fine, just let me know, so I can deploy it to the dart pub.

Thank you!

@isaLima21
Copy link
Author

@miguelpruivo just tested it and it's working.

@miguelpruivo
Copy link
Owner

@IsaNascimento all done. The 1.3.5 is out.

You can now use it normally as before (file_picker: ^1.3.5).

Thank you for your feedback.

@mehdisam
Copy link

documentPicker:didPickDocumentAtURL: is deprecated in iOS 11.0 and it is replaced by documentPicker:didPickDocumentsAtURLs: yeah single 's' added to it, but you have to implement both for backward compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants