Skip to content

Commit c4c36de

Browse files
[MOO-1762]: dependency update for new rn architecture (#236)
2 parents aefa2d4 + 4b73b98 commit c4c36de

40 files changed

+8730
-6159
lines changed

configs/e2e/native_dependencies.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
{
2-
"react-native-maps": "0.31.1",
2+
"react-native-maps": "1.14.0",
33
"react-native-geocoder": "0.5.0",
44
"react-native-device-info": "13.0.0",
55
"react-native-action-button": "2.8.5",
66
"react-native-material-menu": "1.2.0",
77
"react-native-linear-gradient": "2.5.6",
8-
"@react-native-community/netinfo": "5.9.7",
8+
"@react-native-community/netinfo": "11.4.1",
99
"react-native-svg": "15.7.1",
1010
"react-native-system-navigation-bar": "2.6.3",
1111
"react-native-video": "5.2.1",
1212
"@react-native-async-storage/async-storage": "2.0.0",
1313
"react-native-camera": "3.40.0",
14-
"react-native-view-shot": "3.1.2",
15-
"react-native-blob-util": "0.16.2",
14+
"react-native-view-shot": "4.0.3",
15+
"react-native-blob-util": "0.21.2",
1616
"react-native-file-viewer": "2.1.5",
1717
"react-native-localize": "3.2.1",
18-
"react-native-image-picker": "5.0.1",
18+
"react-native-image-picker": "7.2.3",
1919
"react-native-permissions": "4.1.5",
20-
"react-native-webview": "11.26.1"
20+
"react-native-webview": "13.13.2"
2121
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@
100100
"react-dom": "18.2.0",
101101
"react-native": "0.75.4",
102102
"@prettier/plugin-xml": "2.2.0",
103-
"@types/react-native": "0.73.0"
103+
"@types/react-native": "0.73.0",
104+
"cheerio": "1.0.0-rc.12"
104105
},
105106
"packageManager": "[email protected]"
106107
}

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

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

77
## [Unreleased]
88

9+
- We migrated from react-native-inappbrowser-reborn to @swan-io/react-native-browser to prevent issues for next rn upgrade.
10+
11+
- We migrated from @react-native-community/cameraroll to @react-native-camera-roll/camera-roll to prevent issues for next rn upgrade.
12+
13+
- We also updated several dependencies such as react-native-blob-util, react-native-image-picker to their latest version.
14+
915
## [9.3.2] Native Mobile Resources - 2025-3-24
1016

1117
## [5.1.1] Maps

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@
2626
"release:marketplace": "node ../../../scripts/release/marketplaceRelease.js"
2727
},
2828
"dependencies": {
29-
"@react-native-community/cameraroll": "4.0.1",
29+
"@react-native-camera-roll/camera-roll": "7.4.0",
3030
"@react-native-community/push-notification-ios": "1.10.1",
3131
"@react-native-firebase/messaging": "17.3.0",
32+
"@swan-io/react-native-browser": "^0.4.1",
3233
"fbjs": "3.0.4",
3334
"mime": "3.0.0",
34-
"react-native-blob-util": "0.16.2",
35+
"react-native-blob-util": "0.21.2",
3536
"react-native-device-info": "13.0.0",
3637
"react-native-file-viewer": "2.1.5",
37-
"react-native-image-picker": "5.0.1",
38-
"react-native-inappbrowser-reborn": "3.4.0",
38+
"react-native-image-picker": "7.2.3",
3939
"react-native-localize": "3.2.1",
4040
"react-native-permissions": "4.1.5",
4141
"react-native-push-notification": "8.1.1",

packages/jsActions/mobile-resources-native/src/camera/SaveToPictureLibrary.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// - the code between BEGIN USER CODE and END USER CODE
66
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
77
// Other code you write will be lost the next time you deploy the project.
8-
import { saveToCameraRoll } from "@react-native-community/cameraroll";
8+
import { CameraRoll } from "@react-native-camera-roll/camera-roll";
99

1010
// BEGIN EXTRA CODE
1111
// END EXTRA CODE
@@ -31,7 +31,13 @@ export async function SaveToPictureLibrary(picture?: mendix.lib.MxObject): Promi
3131
const changedDate = picture.get("changedDate") as number;
3232
const url = mx.data.getDocumentUrl(guid, changedDate);
3333

34-
return saveToCameraRoll(url);
34+
// Save the file as a photo to the camera roll.
35+
try {
36+
const savedUri = await CameraRoll.saveToCameraRoll(url, "auto");
37+
return Promise.resolve(savedUri.node.image.uri);
38+
} catch (error) {
39+
return Promise.reject(error);
40+
}
3541

3642
// END USER CODE
3743
}

packages/jsActions/mobile-resources-native/src/camera/TakePicture.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export async function TakePicture(
5656
}
5757

5858
// V3 dropped the feature of providing an action sheet so users can decide on which action to take, camera or library.
59-
const nativeVersionMajor = NativeModules.ImagePickerManager.showImagePicker ? 2 : 4;
59+
const nativeVersionMajor = NativeModules?.ImagePickerManager?.showImagePicker ? 2 : 4;
6060
const RNPermissions = nativeVersionMajor === 4 ? (await import("react-native-permissions")).default : null;
6161

6262
try {

packages/jsActions/mobile-resources-native/src/camera/TakePictureAdvanced.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export async function TakePictureAdvanced(
6262
}
6363

6464
// V3 dropped the feature of providing an action sheet so users can decide on which action to take, camera or library.
65-
const nativeVersionMajor = NativeModules.ImagePickerManager.showImagePicker ? 2 : 4;
65+
const nativeVersionMajor = NativeModules?.ImagePickerManager?.showImagePicker ? 2 : 4;
6666
const RNPermissions = nativeVersionMajor === 4 ? (await import("react-native-permissions")).default : null;
6767
const resultObject = await createMxObject("NativeMobileResources.ImageMetaData");
6868

packages/jsActions/mobile-resources-native/src/platform/OpenInAppBrowser.ts

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// - the code between BEGIN USER CODE and END USER CODE
66
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
77
// Other code you write will be lost the next time you deploy the project.
8-
import InAppBrowser, { InAppBrowserOptions } from "react-native-inappbrowser-reborn";
8+
import { openBrowser } from "@swan-io/react-native-browser";
99

1010
// BEGIN EXTRA CODE
1111
// END EXTRA CODE
@@ -25,21 +25,23 @@ export async function OpenInAppBrowser(
2525
): Promise<void> {
2626
// BEGIN USER CODE
2727
// Documentation https://github.com/proyecto26/react-native-inappbrowser
28-
2928
if (!url) {
30-
return Promise.reject(new Error("Input parameter 'Url' is required"));
29+
return Promise.reject(new Error("Input parameter 'url' is required"));
3130
}
3231

33-
const options: InAppBrowserOptions = {
34-
toolbarColor,
35-
preferredBarTintColor: toolbarColor,
36-
dismissButtonStyle: iosDismissButtonStyle,
37-
showTitle: androidShowTitle
32+
const options = {
33+
barTintColor: toolbarColor, // iOS toolbar color
34+
controlTintColor: toolbarColor, // iOS control buttons color
35+
dismissButtonStyle: iosDismissButtonStyle, // iOS dismiss button style
36+
showTitle: androidShowTitle // Android show title
3837
};
3938

40-
await InAppBrowser.open(url, options);
41-
42-
return Promise.resolve();
39+
try {
40+
await openBrowser(url, options);
41+
return Promise.resolve();
42+
} catch (error) {
43+
return Promise.reject(error);
44+
}
4345

4446
// END USER CODE
4547
}

packages/jsActions/nanoflow-actions-native/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@
3636
"mendix": "~10.0.9976",
3737
"rollup": "^2.79.2"
3838
}
39-
}
39+
}

packages/pluggableWidgets/app-events-native/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
## [Unreleased]
88

9+
### Changed
10+
11+
- Updated @react-native-community/netinfo from version v5.9.7 to v11.4.1.
12+
913
## [4.1.0] - 2024-12-3
1014

1115
### Changed

0 commit comments

Comments
 (0)