Commit Graph

40 Commits

Author SHA1 Message Date
Vojtech Novak
991368aaa1
fix(ios): file copy error handling (#653) 2023-05-16 08:40:10 +02:00
Vojtech Novak
fc1c0f2d24
feat: new architecture support (#649)
* feat: rn 70 ios builds with new arch

* feat: android migration wip

* fix: update test-app, react-native and react version, fix codegen config

* fix: change spec for backward compat

* fix: simplify android code and make it work

* fix: ios code

* fix: remove unnecessary folly version

* fix: srcDirs on paper

* refactor: review

* refactor: review

* refactor: node 18

* docs: new arch in readme

* docs: new arch in readme

* refactor: use Spec

---------

Co-authored-by: Wojciech Lewicki <wojciech.lewicki@swmansion.com>
2023-05-15 21:56:02 +02:00
Vojtech Novak
290465a6e2
chore: extract RCTConvert (#551) 2022-04-01 23:27:43 +07:00
Darkce
0d301cb1bc
feat: support transitionStyle on iOS (#549)
* feat: add transitionStyle option on ios

* Update src/index.tsx

Co-authored-by: Vojtech Novak <vonovak@gmail.com>
2022-04-01 22:22:11 +07:00
Vojtech Novak
45f57bc75d
feat: add explicit pickDirectory() ios implementation (#483) 2021-10-07 00:28:32 +02:00
Vojtech Novak
6ff5fd3886
feat: fileCopyUri to be null if copyTo not provided (#481)
BREAKING CHANGE - fileCopyUri can be null
2021-10-06 20:05:32 +02:00
Vojtech Novak
f8dd453ca6
feat: support presentationStyle on ios (#477) 2021-10-02 21:04:52 +02:00
Vojtech Novak
b949b47ef8
fix: do not crash on double select (#476)
* fix: do not crash on double select

* docs: clarify isInProgress()
2021-10-02 20:16:44 +02:00
Vojtech Novak
db09e24e5d
feat: rework module using react native bob (#421)
* 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>
2021-08-09 20:24:22 +02:00
Celal Deniz
b8ecaf2f61
fix: prevent crash on mac silicon (#403)
* hot fix for silicon mac 

UTTypeCreatePreferredIdentifierForTag nullable control added. 
https://github.com/rnmods/react-native-document-picker/issues/394

* Update RNDocumentPicker.m

Co-authored-by: Vojtech Novak <vonovak@gmail.com>
2021-05-12 00:11:00 +02:00
Dominique Rau
27fb03c900
feat(ios): listen to user dismiss via swipe down (#399) 2021-03-31 21:24:01 +02:00
David Narbutovich
493f9ff5cf
Fix crash on iOS (#383)
Issue: https://github.com/rnmods/react-native-document-picker/issues/276
2021-02-02 14:16:41 +01:00
Richard Février
0ead2a58ed
iOS : add mode option (#345)
* iOS : add mode option

* iOS : fix add mode option

* readme: fix releaseSecureAccess signature

* fix: do not mutate collection while enumerating

Co-authored-by: Vojtech Novak <vonovak@gmail.com>
2020-12-25 19:14:41 +01:00
Vojtech Novak
cfec2545e4
target ios 9 (#315) 2020-06-15 19:36:21 +02:00
Vojtech Novak
2cee0e35d0 allow cache and docs dirs 2020-06-10 23:23:56 +02:00
Vojtech Novak
5daf5898da allow file copying 2020-05-21 18:47:34 +02:00
Rajiv Shah
40dead81ed
iOS: Use official method to get root view controller
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.
2019-08-19 15:48:58 -04:00
Sergey Zolotarev
902ba8012c Fix Xcode 10 warnings 2018-11-26 02:31:21 +06:00
Lachlan Roche
339dc08f81 remove runtime warning about requiresMainQueueSetup 2018-10-31 22:22:18 +10:00
Daniel Friesen
20f937a346 Support use of Xcode 8
@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.
2017-10-18 17:21:22 -07:00
Daniel Friesen
54f64e82bb Implement support for multiple selection on Android and iOS
`show` has been renamed to `pick` and a new `pickMultiple` has been added.

For simplicity the native code always returns an array.
2017-10-14 04:49:34 -07:00
Daniel Friesen
2675553a67 Replace UIDocumentMenuViewController with UIDocumentPickerViewController
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.
2017-10-13 03:07:24 -07:00
Daniel Friesen
9dc2807446 Replace the deprecated modalViewController with presentedViewController 2017-10-13 02:17:24 -07:00
Daniel Friesen
7a7ee8ec8a Implement type attribute on iOS 2017-10-13 01:02:26 -07:00
Daniel Friesen
df923a22e1 Re-indent Objective-C code 2017-10-13 00:58:08 -07:00
Daniel Friesen
f0b0f379f5 Refactor fileSize output to size
This one isn't necessary but after renaming fileName with a good rationale fileSize is the only attribute that feels out of place.
2017-10-12 19:27:35 -07:00
Daniel Friesen
f20680ad5a Handle coordinator errors in iOS 2017-10-12 19:21:19 -07:00
Daniel Friesen
8d444c7ace Rename fileName to name
Android's DISPLAY_NAME is not always a filename.

Also refactor to use FIELD_ constants everywhere.
2017-10-12 16:11:05 -07:00
Daniel Friesen
cfe4ce26b8 Refactor filetype option to a new type option
- 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
2017-10-11 22:46:02 -07:00
Daniel Friesen
8648b12b12 Add handling for when the document picker is cancelled by the user
- 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
2017-10-11 21:39:27 -07:00
Daniel Friesen
b9fa313a6d Refactor code to use promises instead of callbacks
- Use promises instead of callbacks in the ObjectiveC and Java code
- Use error codes when rejecting promises from Java
2017-10-11 15:50:26 -07:00
Benoist Claassen
748c56e327 remove unused popover controller 2017-04-04 09:01:06 +02:00
Benoist Claassen
83c5433097 added ipad support
position of popover can be set
2017-03-20 14:19:40 +01:00
Sibelius Seraphini
1aeb4a05bf Support to RN40+ and fixed react-native link
- fix #15
- fix #17
2017-02-22 12:33:05 -03:00
npomfret
821b2ba4ae Merge remote-tracking branch 'upstream/master' 2016-08-28 11:28:16 +01:00
npomfret
951a65e01f implemented fileSize in the response 2016-07-27 11:33:14 +01:00
npomfret
0b8d25423a more consistent naming of fields 2016-07-27 10:26:20 +01:00
npomfret
87f1707887 made ios implemention return a map to match signature of the android code 2016-07-27 10:20:01 +01:00
npomfret
4eefeb15b2 fixed xcode project file after move into ios directory 2016-07-27 10:19:17 +01:00
npomfret
15ea448cc3 moved the ios stuff into its own folder 2016-07-26 21:45:21 +01:00