Closed sleepychaman closed 1 year ago
got same issue on iOS, no file returns, actually it happens very randomly (not always).
is there any solution/workaround for this?
or is there a function where I can detect if the "file browser/directory" closed (so I can just put an error message whenever this issue happen)?
Moved all the "on" to ngOnInit (i'm on nativescript-angular), and called the openFilePicker only on click of button and it fixed for me
yeah, I think seperating the openFilePicker method from other plugin's methods will do the trick
I have this problem too. Also error and cancel callbacks are sometimes not called as well.
Try to do as i saied @erkanarslan , put the "on's" functions and initialisation on the beginning and call the openFilePicker like on a button click or something
Filepicker is used in many places in my app. Because of that I put it into a service. I cannot do that.
So initialize it in the constructor of your service
@kriefsacha I tried that and it works. Instead of creating a new filepicker instance each time, I created one instance and used it for all operations.
This saved me guys thanks!
Describe the bug A clear and concise description of what the bug is.
When calling
openFilePicker
getFiles is not triggered the first time i choose a file (icloud or not) and some times even the second times.To Reproduce Steps to reproduce the behavior: select a file (icloud or not) in ios
Expected behavior A clear and concise description of what you expected to happen. I expect getFiles to be triggered each time i select a file (icloud or not)
NativeScript Info(please run
tns info
):✔ Getting NativeScript components versions information... ⚠ Update available for component nativescript. Your current version is 6.5.0 and the latest available version is 6.7.4. ⚠ Update available for component tns-core-modules. Your current version is 6.5.1 and the latest available version is 6.5.7. ⚠ Update available for component tns-android. Your current version is 6.5.0 and the latest available version is 6.5.1. ⚠ Update available for component tns-ios. Your current version is 6.3.0 and the latest available version is 6.5.1.
Sample Code(please provide minimum code to reproduce problem): ` let extensions = [];
Additional context Add any other context about the problem here.
documentPickerDidPickDocumentsAtURLs
is not called so thats why getFiles is not triggered, I try to resolve it and make a PR, but I can't make it work. PS: Thanks for this plugin !