Good morning,
I'm trying to use Xam.plugin.FilePicker, on the android it opens the file finder , but it does nothing else,
on IOS does not even open the file finder, it should fill a variable with the file name and it doesn't, how do I solve it?
the code I use is this:
public async void SendFile() { try { FileData fileData = await CrossFilePicker.Current.PickFile(); if (fileData == null) return; // user canceled file picking string fileName = fileData.FileName; } catch (Exception ex) { System.Console.WriteLine("Exception choosing file: " + ex.ToString()); } }
Update it to the latest to see if problem persists .
Refer https://github.com/jfversluis/FilePicker-Plugin-for-Xamarin-and-Windows/issues/107#issue-378120059.
Answers
After reading the instruction , i found the plugin requires you configure iCloud Driver first on iOS , did you complete it ?
Refer https://github.com/jfversluis/FilePicker-Plugin-for-Xamarin-and-Windows#important .
I don't know how to do it, it's just that I approach with IOS, for Android instead?
What do you mean by
it does nothing else
?Did you see the file in the folder and can you pick it ?
does not execute the commands that are there after.
the file from android I can choose, then it should read the name put it in a variable, but it doesn't execute the commands that are there after this FileData fileData = await CrossFilePicker.Current.PickFile(); because I tried with some brackpoint
I also noticed that the command FileData fileData = await CrossFilePicker.Current.PickFile(); executes it only once
Which version of the plugin are you using ?I need test on my side .
I use the version 1.1.0
Update it to the latest to see if problem persists .
Refer https://github.com/jfversluis/FilePicker-Plugin-for-Xamarin-and-Windows/issues/107#issue-378120059.
now that I notice the plugin you have indicated is different from the one I use so now I install what you have indicated to me
on android I solved by changing replacing the library used by me with the one posted by you
If helps ,please accept my answer.
now how do I solve with the IOS part?
As i mentioned above , you should configure iCloud Driver first on iOS.
thanks
https://docs.microsoft.com/en-us/xamarin/ios/data-cloud/intro-to-cloudkit#enabling-cloudkit-in-a-xamarin-application
should I only do this part or the whole guide?
I skip all the instructions by not opening any page to search for the file via icloud