Closed sandeepams closed 6 years ago
Hi @rafaelrmou, can u help me finding the solution for the above issue.
hi sandeepams, correctly,i can't say this issue.. please use try and catch and you can see that kind of issues and solve them. if you can't solve that issue please let me know that
Which version of iOS SDK are you using? The iOS 11 SDK has deprecated the DidPickDocument callback, which may be the cause of this issue. This likely needs fixed in the plugin to support the new callback.
I customized in plugin, like
Used "DocumentPicker_DidPickDocumentAtUrls" event instead of "DocumentPicker_DidPickDocument". while returning selected file used
new FileData(e.FilePath, e.FileName, () => { var url = new Foundation.NSUrl(e.FilePath); return new FileStream(url.Path, FileMode.Open, FileAccess.Read); }) This solved my issue Thanks.
Hi @sandeepams Can you show the details about event instead of "DocumentPicker_DidPickDocument". while returning selected file used. Thank you advance.
Hi @carl-neng, check this link below, this is the customized version of existing plugin code, please not the changes are mentioned in my above post.. Just open the solution, rebuild the IOS project and copy the dlls(Plugin.FilePicker.Abstractions && Plugin.FilePicker) to your project.
FilePicker-Plugin-for-Xamarin-and-Windows-master.zip
if this is not clear, please let me know, i'm happy in helping you.
Hi @sandeepams Thank you so much now it working fine.
Hi @sandeepams When i'm using this dlls(Plugin.FilePicker.Abstractions && Plugin.FilePicker) I have problem with PNG file when I'm try to pickfile. It is show me don't have DataArray(byte). Please help to this issue. Thank you ---- FileName ---
---- Debug Error -----
Hi @carl-neng , just in case, could u please check the plugin code you r generating these dlls. in FilePickerImplementation.cs file, under TakeMediaAsync() method make sure the handler code implemented this way.
Handler = (s, e) => { var tcs = Interlocked.Exchange(ref _completionSource, null); tcs?.SetResult(new FileData(e.FilePath, e.FileName, () => { var url = new Foundation.NSUrl(e.FilePath); return new FileStream(url.Path, FileMode.Open, FileAccess.Read); })); };
Hi @sandeepams Yes exactly, I use like this. Because I has been downloaded your sample you give with zip file. And I'm try use it again..... so what can do please help.
@carl-neng , only issue is with PNG files? strange it worked in my device.
Hi @sandeepams Yes sure, and have problem when we selected the same file for two time.
@carl-neng , Today also i tested my app, accepting PNG files and accepting same file multiple times, may be rebuild issue of plugin. could you please try clean rebuild plugin and import new dlls?
This should now be working in this NuGet: https://www.nuget.org/packages/Xamarin.Plugin.FilePicker/1.4.0-beta
If not, please open a issue on the new repo where development will be continued: https://github.com/jfversluis/FilePicker-Plugin-for-Xamarin-and-Windows/issues
Hi @jfversluis , I've installed filepicker control from Nuget and added tried adding reference from MonoTouch10 folder and later from github to my xamarin.ios project.
this is the code i added to my browse button, after selecting a file from iCloud drive, control never comes to 2. if condition.
and again when i click on browse button for second time, app crashes saying "only one operation can be active at a time".