Skip to content

Commit aeae325

Browse files
Moo 2019 react native file viewer upgrade (#301)
2 parents 3e2203d + 5d63705 commit aeae325

5 files changed

Lines changed: 14 additions & 10 deletions

File tree

configs/e2e/native_dependencies.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"react-native-camera": "3.40.0",
1414
"react-native-view-shot": "4.0.3",
1515
"react-native-blob-util": "0.21.2",
16-
"react-native-file-viewer": "2.1.5",
16+
"react-native-file-viewer-turbo": "0.6.0",
1717
"react-native-localize": "3.2.1",
1818
"react-native-image-picker": "7.2.3",
1919
"react-native-permissions": "4.1.5",

packages/jsActions/mobile-resources-native/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
77
## [Unreleased]
88

99
- Updated react-native from version 0.75.4 to 0.77.3.
10+
- We migrated from react-native-file-viewer to react-native-file-viewer-turbo for new architecture compatibility
11+
- File viewer now uses modal to display content
1012

1113
## [10.0.0] Native Mobile Resources - 2025-3-31
1214

packages/jsActions/mobile-resources-native/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"react-native-biometrics": "3.0.1",
3636
"react-native-blob-util": "0.21.2",
3737
"react-native-device-info": "14.0.4",
38-
"react-native-file-viewer": "2.1.5",
38+
"react-native-file-viewer-turbo": "0.6.0",
3939
"react-native-image-picker": "7.2.3",
4040
"react-native-localize": "3.2.1",
4141
"react-native-permissions": "4.1.5",

packages/jsActions/mobile-resources-native/src/file-download/DownloadFile.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// Other code you write will be lost the next time you deploy the project.
88
import { Platform } from "react-native";
99
import RNBlobUtil from "react-native-blob-util";
10-
import FileViewer from "react-native-file-viewer";
10+
import { open } from "react-native-file-viewer-turbo";
1111
import mimeTypes from "mime";
1212

1313
// BEGIN EXTRA CODE
@@ -91,7 +91,7 @@ export async function DownloadFile(file: mendix.lib.MxObject, openWithOS: boolea
9191
}
9292
}
9393
if (openWithOS) {
94-
await FileViewer.open(accessiblePath, {
94+
await open(accessiblePath, {
9595
showOpenWithDialog: true,
9696
showAppsSuggestions: true
9797
});

pnpm-lock.yaml

Lines changed: 8 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)