Skip to content

Commit 1514812

Browse files
committed
chore: update to @react-native-documents/picker and adjust iOS platform version
1 parent 40f5af3 commit 1514812

File tree

5 files changed

+12
-10
lines changed

5 files changed

+12
-10
lines changed

packages/uikit-react-native/src/platform/openDocument.native.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ async function openDocumentByNewDocumentsPicker(
4545
}
4646

4747
function isOldModule(documentPicker: DocumentPicker): documentPicker is typeof OldDocumentPicker {
48-
return typeof (documentPicker as typeof OldDocumentPicker).pickSingle === 'function';
48+
return 'pickSingle' in documentPicker && typeof documentPicker.pickSingle === 'function';
4949
}
5050

5151
export async function openDocument(

sample/ios/Podfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ require Pod::Executable.execute_command('node', ['-p',
66
{paths: [process.argv[1]]},
77
)', __dir__]).strip
88

9-
platform :ios, min_ios_version_supported
9+
# Since the minimum supported version of @react-native-documents/picker is iOS 14.
10+
platform :ios, 14
11+
# platform :ios, min_ios_version_supported
1012
prepare_react_native_project!
1113

1214
linkage = ENV['USE_FRAMEWORKS']

sample/ios/Podfile.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,7 +1044,7 @@ PODS:
10441044
- Yoga
10451045
- react-native-create-thumbnail (2.0.0):
10461046
- React-Core
1047-
- react-native-document-picker (9.3.1):
1047+
- react-native-document-picker (10.1.2):
10481048
- DoubleConversion
10491049
- glog
10501050
- hermes-engine
@@ -1510,7 +1510,7 @@ DEPENDENCIES:
15101510
- React-Mapbuffer (from `../../node_modules/react-native/ReactCommon`)
15111511
- "react-native-cameraroll (from `../../node_modules/@react-native-camera-roll/camera-roll`)"
15121512
- react-native-create-thumbnail (from `../../node_modules/react-native-create-thumbnail`)
1513-
- react-native-document-picker (from `../../node_modules/react-native-document-picker`)
1513+
- "react-native-document-picker (from `../../node_modules/@react-native-documents/picker`)"
15141514
- react-native-image-picker (from `../../node_modules/react-native-image-picker`)
15151515
- "react-native-image-resizer (from `../../node_modules/@bam.tech/react-native-image-resizer`)"
15161516
- react-native-mmkv (from `../../node_modules/react-native-mmkv`)
@@ -1650,7 +1650,7 @@ EXTERNAL SOURCES:
16501650
react-native-create-thumbnail:
16511651
:path: "../../node_modules/react-native-create-thumbnail"
16521652
react-native-document-picker:
1653-
:path: "../../node_modules/react-native-document-picker"
1653+
:path: "../../node_modules/@react-native-documents/picker"
16541654
react-native-image-picker:
16551655
:path: "../../node_modules/react-native-image-picker"
16561656
react-native-image-resizer:
@@ -1763,7 +1763,7 @@ SPEC CHECKSUMS:
17631763
Permission-PhotoLibrary: 03c52ed95dadfb0f2ba4c7663786cce0c4e0c978
17641764
Permission-PhotoLibraryAddOnly: c4fbf91806bbdc3ed877049bc09fbe58ad9a7c97
17651765
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
1766-
RCT-Folly: 5dc73daec3476616d19e8a53f0156176f7b55461
1766+
RCT-Folly: 02617c592a293bd6d418e0a88ff4ee1f88329b47
17671767
RCTDeprecation: 4c7eeb42be0b2e95195563c49be08d0b839d22b4
17681768
RCTRequired: d530a0f489699c8500e944fde963102c42dcd0c2
17691769
RCTTypeSafety: b20878506b094fa3d9007d7b9e4be0faa3562499
@@ -1789,7 +1789,7 @@ SPEC CHECKSUMS:
17891789
React-Mapbuffer: 9f68550e7c6839d01411ac8896aea5c868eff63a
17901790
react-native-cameraroll: 4f313ab09aeaf42ac5f72dec840641da7656f104
17911791
react-native-create-thumbnail: ab55d24aea01723cf386f18b0b542aabb1982f27
1792-
react-native-document-picker: c4f197741c327270453aa9840932098e0064fd52
1792+
react-native-document-picker: 570a73e1d3a71d2b34e1c7d7d46c7f2e3c14b0cd
17931793
react-native-image-picker: c3afe5472ef870d98a4b28415fc0b928161ee5f7
17941794
react-native-image-resizer: fd0c333eca55147bd55c5e054cac95dcd0da6814
17951795
react-native-mmkv: 8c9a677e64a1ac89b0c6cf240feea528318b3074
@@ -1839,6 +1839,6 @@ SPEC CHECKSUMS:
18391839
Yoga: 04f1db30bb810187397fa4c37dd1868a27af229c
18401840
ZIPFoundation: b8c29ea7ae353b309bc810586181fd073cb3312c
18411841

1842-
PODFILE CHECKSUM: 854e85b2bbfd7d0e442b6dea393d8c15cb83909e
1842+
PODFILE CHECKSUM: a7dd46320c0e4bc28bcdaa9f6fbf4caf6e4131d4
18431843

18441844
COCOAPODS: 1.15.2

sample/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"@react-native-community/netinfo": "^11.3.2",
2424
"@react-native-community/push-notification-ios": "^1.11.0",
2525
"@react-native-community/slider": "^4.2.0",
26+
"@react-native-documents/picker": "^10.1.0",
2627
"@react-native-firebase/app": "^14.7.0",
2728
"@react-native-firebase/messaging": "^14.7.0",
2829
"@react-navigation/bottom-tabs": "^6.6.0",
@@ -41,7 +42,6 @@
4142
"react-native": "0.74.3",
4243
"react-native-audio-recorder-player": "^3.6.10",
4344
"react-native-create-thumbnail": "^2.0.0",
44-
"react-native-document-picker": "^9.3.0",
4545
"react-native-fast-image": "^8.6.3",
4646
"react-native-file-access": "^3.1.0",
4747
"react-native-image-picker": "^7.1.2",

sample/src/factory/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import * as ImageResizer from '@bam.tech/react-native-image-resizer';
22
import { CameraRoll } from '@react-native-camera-roll/camera-roll';
33
import Clipboard from '@react-native-clipboard/clipboard';
4+
import * as DocumentPicker from '@react-native-documents/picker';
45
import RNFBMessaging from '@react-native-firebase/messaging';
56
import { createNativeStackNavigator } from '@react-navigation/native-stack';
67
import { Platform, StatusBar } from 'react-native';
78
import * as AudioRecorderPlayer from 'react-native-audio-recorder-player';
89
import * as CreateThumbnail from 'react-native-create-thumbnail';
9-
import * as DocumentPicker from 'react-native-document-picker';
1010
import * as FileAccess from 'react-native-file-access';
1111
import * as ImagePicker from 'react-native-image-picker';
1212
import * as Permissions from 'react-native-permissions';

0 commit comments

Comments
 (0)