* feat: rework module using react native bob
* chore: rebase
* Added windows example (not working for the moment)
* Fixed implementation of the Windows example
* Fixed Lint issues
* Fixed a missing Lint issue
* Fixed another missing Lint issue
* fix: fixed all the pending Lint issues
* Added pickDirectory() implementation for Windows (proper PR) (#444)
* feat: added pickDirectory implementation for Windows
* fix: fixed typo in property name
Co-authored-by: Matteo Pagani <matteo.pagani@microsoft.com>
The current way of obtaining the root view controller appears to not be working in RN 0.59.10. This new approach uses an official [method](91681016e8/React/Base/RCTUtils.h (L87)) provided by React Native.
@available was added in Xcode 9. Generally only Xcode 9 even has the iOS 11 SDK so we can just omit multi-selection handling when the iOS sdk is lower than 11.
UIDocumentMenuViewController is now deprecated because iOS 11 has a new interface for picking files from old providers and a new file provider api which does not need a provider to be picked before opening it.
Before iOS 11 directly opening a UIDocumentPickerViewController instead of going through a UIDocumentMenuViewController would just open the most recently opened document provider. This was considered an optional alternative method of launching a document picker because the user is still able to switch between document providers even without the document provider menu.
Because the menu is no longer used the iPad specific top/left properties are no longer relevant.
- Rename filetype to type
- When type is omitted default to `allFiles`
- Add error for when a filetype or types option is accidentally used
- Allow type to be a string instead of an array
- Add errors handling empty arrays or non-string types
- Android: Fix so RESULT_CANCELED is handled directly instead of considered an unknown result
- iOS: Handle the documentMenu and documentPicker WasCancelled delegates
- Add `DocumentPicker.isCancel(err)` helper to check for the cancellation error thrown