Studyxnet / FilePicker-Plugin-for-Xamarin-and-Windows

FilePicker Plugin for Xamarin and Windows
MIT License
74 stars 52 forks source link

Unable to select a document using FilePicker #13

Closed JulianWreford closed 7 years ago

JulianWreford commented 7 years ago

Hi I'm using the FilePicker plugin to enable user to select a document from iCloud in iOS from shared PCL using Visual Studio 2015. I setup provisioning profile for iCloud and installed the plugin but when using the code below it shows file picker from iCloud where I have 2 documents created with Pages app but they are greyed out and unable to select them?

     `try
        {
            FileData fileData = await CrossFilePicker.Current.PickFile();
            Byte[] byteArray = fileData.DataArray;
            string fileName = fileData.FileName;

        }
        catch(Exception e)
        {
            await DispalyUserMessage("Exception Caught", e.Message, "OK");
        }`

Also when using nothing happens?

FileData filedata = new FileData(); Byte[] bytearray = new Byte[100]; filedata.DataArray = bytearray; await CrossFilePicker.Current.SaveFile(filedata);

I also followed this method to install iOS dll's manually: https://github.com/Studyxnet/FilePicker-Plugin-for-Xamarin-and-Windows/issues/3

I'm using Visual Studio 2015 Xamarin 2.3.3-pre4 for iOS 10

Images here: https://www.dropbox.com/s/6wh92ges0be0q56/WP_20161121_17_17_50_Pro.jpg?dl=0

JulianWreford commented 7 years ago

Closed.

Solved by first saving email attachments to iCloud on iPad. Then when running the app I was able to open the saved attachment!