nativescript-community / ui-document-picker

A NativeScript plugin that allows you to select files from the device.
https://nativescript-community.github.io/ui-document-picker/
Apache License 2.0
10 stars 8 forks source link

IOS: error when call openFilePicker #12

Closed cristiandaulisio closed 2 years ago

cristiandaulisio commented 2 years ago

I receive this error after this code:

const filePicked = await openFilePicker({
                    multipleSelection: false,
                    extensions: ['txt', 'pdf'],
                    pickerMode: 2
                })

Error: -[UIDocumentPickerViewController initWithDocumentTypes:inMode:] can only be called with mode Import or Open It work fine on Android, but not in IOS.

edit: pickermode 2 was the problem. Can't delete this issue.