Skip to content

Commit 83942ee

Browse files
committed
[birdofpreyru#44] v2.25.1: Fixes a critical bug + Updates dependencies
1 parent 70c3e0b commit 83942ee

File tree

5 files changed

+615
-607
lines changed

5 files changed

+615
-607
lines changed

example/ios/Podfile.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PODS:
22
- boost (1.83.0)
33
- DoubleConversion (1.1.6)
4-
- dr-pogodin-react-native-fs (2.25.0):
4+
- dr-pogodin-react-native-fs (2.25.1):
55
- DoubleConversion
66
- glog
77
- hermes-engine
@@ -22,7 +22,7 @@ PODS:
2222
- ReactCommon/turbomodule/bridging
2323
- ReactCommon/turbomodule/core
2424
- Yoga
25-
- dr-pogodin-react-native-static-server (0.14.0):
25+
- dr-pogodin-react-native-static-server (0.15.0):
2626
- DoubleConversion
2727
- glog
2828
- hermes-engine
@@ -1391,8 +1391,8 @@ EXTERNAL SOURCES:
13911391
SPEC CHECKSUMS:
13921392
boost: d3f49c53809116a5d38da093a8aa78bf551aed09
13931393
DoubleConversion: 76ab83afb40bddeeee456813d9c04f67f78771b5
1394-
dr-pogodin-react-native-fs: 4a4d7328b931bb3fac7b5414f1ba1c97d53655f0
1395-
dr-pogodin-react-native-static-server: 01df542fcda40860b1aacdea7e042adbcdf57bce
1394+
dr-pogodin-react-native-fs: 1b8692d91b0af367bcae2acd834c48b609c6fc36
1395+
dr-pogodin-react-native-static-server: d93f2556a2ac75007d784bb90d088385360df8d4
13961396
FBLazyVector: 898d14d17bf19e2435cafd9ea2a1033efe445709
13971397
fmt: 4c2741a687cc09f0634a2e2c72a838b99f1ff120
13981398
glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2

example/package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@
1313
"build:ios": "cd ios && xcodebuild -workspace ReactNativeFsExample.xcworkspace -scheme ReactNativeFsExample -configuration Debug -sdk iphonesimulator CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ GCC_OPTIMIZATION_LEVEL=0 GCC_PRECOMPILE_PREFIX_HEADER=YES ASSETCATALOG_COMPILER_OPTIMIZATION=time DEBUG_INFORMATION_FORMAT=dwarf COMPILER_INDEX_STORE_ENABLE=NO"
1414
},
1515
"dependencies": {
16-
"@dr.pogodin/react-native-static-server": "^0.14.0",
17-
"@types/lodash": "^4.17.1",
16+
"@dr.pogodin/react-native-static-server": "^0.15.0",
17+
"@types/lodash": "^4.17.4",
1818
"lodash": "^4.17.21",
1919
"react": "18.3.1",
2020
"react-native": "0.74.1",
21-
"react-native-windows": "0.74.2"
21+
"react-native-windows": "0.74.5"
2222
},
2323
"devDependencies": {
24-
"@babel/core": "^7.24.5",
25-
"@babel/preset-env": "^7.24.5",
26-
"@babel/runtime": "^7.24.5",
24+
"@babel/core": "^7.24.6",
25+
"@babel/preset-env": "^7.24.6",
26+
"@babel/runtime": "^7.24.6",
2727
"@react-native/babel-preset": "0.74.83",
2828
"@react-native/metro-config": "0.74.83",
2929
"@react-native/typescript-config": "0.74.83",

ios/ReactNativeFs.mm

+11-2
Original file line numberDiff line numberDiff line change
@@ -1156,15 +1156,24 @@ - (void)documentPickerWasCancelled:(UIDocumentPickerViewController *)picker
11561156
resolve:(RCTPromiseResolveBlock)resolve
11571157
reject:(RCTPromiseRejectBlock)reject
11581158
) {
1159+
// NOTE: We must copy options into a local variable, so that (especially with
1160+
// the new, bridgeless architecture) it is correctly detained by the async
1161+
// block below, not crushing the app.
1162+
// See: https://github.com/birdofpreyru/react-native-fs/issues/44
1163+
# ifdef RCT_NEW_ARCH_ENABLED
1164+
JS::NativeReactNativeFs::PickFileOptionsT o = options;
1165+
# else
1166+
NSDictionary* o = options;
1167+
# endif
11591168
dispatch_async(dispatch_get_main_queue(), ^() {
11601169
@try {
11611170
UIDocumentPickerViewController *picker;
11621171

11631172
# ifdef RCT_NEW_ARCH_ENABLED
1164-
facebook::react::LazyVector<NSString*> mimeTypes = options.mimeTypes();
1173+
facebook::react::LazyVector<NSString*> mimeTypes = o.mimeTypes();
11651174
int numMimeTypes = mimeTypes.size();
11661175
# else
1167-
NSArray<NSString*>* mimeTypes = options[@"mimeTypes"];
1176+
NSArray<NSString*>* mimeTypes = o[@"mimeTypes"];
11681177
int numMimeTypes = mimeTypes.count;
11691178
# endif
11701179

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@dr.pogodin/react-native-fs",
3-
"version": "2.25.0",
3+
"version": "2.25.1",
44
"description": "Native filesystem access for React Native",
55
"main": "lib/commonjs/index",
66
"module": "lib/module/index",
@@ -51,7 +51,7 @@
5151
"devDependencies": {
5252
"@react-native/eslint-config": "^0.74.83",
5353
"@types/jest": "^29.5.12",
54-
"@types/react": "^18.3.1",
54+
"@types/react": "^18.3.3",
5555
"del-cli": "^5.1.0",
5656
"eslint": "^8.57.0",
5757
"eslint-config-prettier": "^9.1.0",
@@ -62,7 +62,7 @@
6262
"react": "18.3.1",
6363
"react-native": "0.74.1",
6464
"react-native-builder-bob": "^0.23.2",
65-
"react-native-windows": "0.74.2",
65+
"react-native-windows": "0.74.5",
6666
"typescript": "^5.4.5"
6767
},
6868
"resolutions": {

0 commit comments

Comments
 (0)