Skip to content

Moo 1800/update dependencies #262

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 25 commits into from
Jul 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
982221e
migrate push notification to notifee
Apr 10, 2025
d0bdf6f
migrate react-native-fast-image to react-native-turbo-image
Apr 10, 2025
d645545
changelog and version update
Apr 10, 2025
aff20a4
changelog
Apr 10, 2025
e91c856
migrated react-native-linear-gradient to expo-linear-gradient
Apr 10, 2025
33b1abc
revert expo linear gradient
Apr 10, 2025
cc4f2a7
updated react-native-device-info to latest version.
Apr 10, 2025
e420914
migrate react-native-touch-id to react-native-biometrics
Apr 10, 2025
e406366
snapshot update
Apr 10, 2025
7ee841f
chore: return the result
Apr 11, 2025
ce95059
revert back @d11/react-native-fast-image until fixing compiling issues
Apr 15, 2025
2d18179
implementation for react-native-track-player
Apr 15, 2025
84cbb20
chore: empty string issue fixed on ios
Apr 15, 2025
8be228b
type check
Apr 16, 2025
0f3d34e
dont run setup player functionality for setup player in every run
Apr 16, 2025
2dcf20c
decreased version from alpha to latest stabil
Apr 18, 2025
3f2a201
chore: snapshot update
Apr 23, 2025
9be6dcc
initialization issue was fixed for track player
May 2, 2025
e8703da
fixed sound and schedule notification
May 6, 2025
3c68f86
dont create a channel if platform is ios since it's not needed
May 7, 2025
78f18cb
fixed sound issue
May 14, 2025
058bac8
revert "react-native-track-player"
May 14, 2025
f0dd481
chore: changelog and versions
Jun 5, 2025
a37d71f
Merge branch 'main' into moo-1800/update-dependencies
karahanharunn Jun 26, 2025
65862e7
fixed type
Jun 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions configs/e2e/native_dependencies.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"react-native-maps": "1.14.0",
"react-native-geocoder": "0.5.0",
"react-native-device-info": "13.0.0",
"react-native-device-info": "14.0.4",
"react-native-action-button": "2.8.5",
"react-native-material-menu": "1.2.0",
"react-native-linear-gradient": "2.5.6",
"react-native-linear-gradient": "2.8.3",
"@react-native-community/netinfo": "11.4.1",
"react-native-svg": "15.11.1",
"react-native-system-navigation-bar": "2.6.3",
Expand Down
10 changes: 4 additions & 6 deletions packages/jsActions/mobile-resources-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,26 @@
"release:marketplace": "node ../../../scripts/release/marketplaceRelease.js"
},
"dependencies": {
"@notifee/react-native": "9.1.8",
"@react-native-camera-roll/camera-roll": "7.4.0",
"@react-native-community/push-notification-ios": "1.10.1",
"@react-native-firebase/messaging": "17.3.0",
"@swan-io/react-native-browser": "^0.4.1",
"@swan-io/react-native-browser": "0.4.1",
"fbjs": "3.0.4",
"mime": "3.0.0",
"react-native-biometrics": "3.0.1",
"react-native-blob-util": "0.21.2",
"react-native-device-info": "13.0.0",
"react-native-device-info": "14.0.4",
"react-native-file-viewer": "2.1.5",
"react-native-image-picker": "7.2.3",
"react-native-localize": "3.2.1",
"react-native-permissions": "4.1.5",
"react-native-push-notification": "8.1.1",
"react-native-schedule-exact-alarm-permission": "^0.1.3",
"react-native-sound": "0.11.0",
"react-native-touch-id": "4.4.1",
"url-parse": "^1.4.7"
},
"devDependencies": {
"@mendix/pluggable-widgets-tools": "^10.0.1",
"@types/querystringify": "^2.0.0",
"@types/react-native-push-notification": "8.1.1",
"@types/url-parse": "^1.4.3",
"eslint": "^7.32.0",
"mendix": "~10.0.9976",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// - the code between BEGIN USER CODE and END USER CODE
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
// Other code you write will be lost the next time you deploy the project.
import TouchID from "react-native-touch-id";
import ReactNativeBiometrics from "react-native-biometrics";

// BEGIN EXTRA CODE
// END EXTRA CODE
Expand All @@ -16,9 +16,12 @@ import TouchID from "react-native-touch-id";
*/
export async function BiometricAuthentication(reason?: string): Promise<boolean> {
// BEGIN USER CODE
// Documentation https://github.com/naoufal/react-native-touch-id
// Documentation https://github.com/smallcase/react-native-simple-biometrics

return TouchID.authenticate(reason)
const rnBiometrics = new ReactNativeBiometrics();

return rnBiometrics
.simplePrompt({ promptMessage: reason ?? "" })
.then(() => true)
.catch(() => false);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// - the code between BEGIN USER CODE and END USER CODE
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
// Other code you write will be lost the next time you deploy the project.
import TouchID from "react-native-touch-id";
import ReactNativeBiometrics from "react-native-biometrics";

// BEGIN EXTRA CODE
// END EXTRA CODE
Expand All @@ -15,10 +15,13 @@ import TouchID from "react-native-touch-id";
*/
export async function IsBiometricAuthenticationSupported(): Promise<boolean> {
// BEGIN USER CODE
// Documentation https://github.com/naoufal/react-native-touch-id
// Documentation https://github.com/smallcase/react-native-simple-biometrics

return TouchID.isSupported()
.then(() => true)
const rnBiometrics = new ReactNativeBiometrics();

return rnBiometrics
.isSensorAvailable()
.then(result => result.available)
.catch(() => false);

// END USER CODE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
// - the code between BEGIN USER CODE and END USER CODE
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
// Other code you write will be lost the next time you deploy the project.
import { NativeModules, Platform } from "react-native";
import PushNotification from "react-native-push-notification";
import { NativeModules } from "react-native";
import notifee from "@notifee/react-native";

// BEGIN EXTRA CODE
// END EXTRA CODE
Expand All @@ -17,13 +17,12 @@ import PushNotification from "react-native-push-notification";
*/
export async function CancelAllScheduledNotifications(): Promise<void> {
// BEGIN USER CODE
// Documentation https://github.com/zo0r/react-native-push-notification
const isIOS = Platform.OS === "ios";
if (NativeModules && isIOS && !NativeModules.RNCPushNotificationIOS) {
return Promise.reject(new Error("Notifications module is not available in your app"));
// Documentation https://github.com/invertase/notifee
if (NativeModules && !NativeModules.NotifeeApiModule) {
return Promise.reject(new Error("Notifee native module is not available in your app"));
}

PushNotification.cancelAllLocalNotifications();
notifee.cancelAllNotifications();
return Promise.resolve();

// END USER CODE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
// - the code between BEGIN USER CODE and END USER CODE
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
// Other code you write will be lost the next time you deploy the project.
import { NativeModules, Platform } from "react-native";
import PushNotification from "react-native-push-notification";
import { NativeModules } from "react-native";
import notifee from "@notifee/react-native";

// BEGIN EXTRA CODE
// END EXTRA CODE
Expand All @@ -17,17 +17,16 @@ import PushNotification from "react-native-push-notification";
*/
export async function CancelScheduledNotification(notificationId?: string): Promise<void> {
// BEGIN USER CODE
// Documentation https://github.com/zo0r/react-native-push-notification
const isIOS = Platform.OS === "ios";
if (NativeModules && isIOS && !NativeModules.RNCPushNotificationIOS) {
return Promise.reject(new Error("Notifications module is not available in your app"));
// Documentation Documentation https://github.com/invertase/notifee
if (NativeModules && !NativeModules.NotifeeApiModule) {
return Promise.reject(new Error("Notifee native module is not available in your app"));
}

if (!notificationId) {
return Promise.reject(new Error("Input parameter 'Notification id' is required"));
}

PushNotification.cancelLocalNotification(notificationId);
notifee.cancelNotification(notificationId);
return Promise.resolve();

// END USER CODE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
// - the code between BEGIN USER CODE and END USER CODE
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
// Other code you write will be lost the next time you deploy the project.
import { NativeModules, Platform } from "react-native";
import PushNotification from "react-native-push-notification";
import { NativeModules } from "react-native";
import notifee from "@notifee/react-native";

// BEGIN EXTRA CODE
// END EXTRA CODE
Expand All @@ -17,13 +17,12 @@ import PushNotification from "react-native-push-notification";
*/
export async function ClearAllDeliveredNotifications(): Promise<void> {
// BEGIN USER CODE
// Documentation https://github.com/zo0r/react-native-push-notification
const isIOS = Platform.OS === "ios";
if (NativeModules && isIOS && !NativeModules.RNCPushNotificationIOS) {
return Promise.reject(new Error("Notifications module is not available in your app"));
// Documentation Documentation https://github.com/invertase/notifee
if (NativeModules && !NativeModules.NotifeeApiModule) {
return Promise.reject(new Error("Notifee native module is not available in your app"));
}

PushNotification.removeAllDeliveredNotifications();
notifee.cancelAllNotifications();

return Promise.resolve();
// END USER CODE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
// Other code you write will be lost the next time you deploy the project.
import { NativeModules, Platform } from "react-native";
import PushNotification, { PushNotificationObject } from "react-native-push-notification";
import notifee, { AndroidChannel, AndroidImportance, Notification } from "@notifee/react-native";

// BEGIN EXTRA CODE
// END EXTRA CODE
Expand All @@ -32,59 +32,54 @@ export async function DisplayNotification(
actionGuid?: string
): Promise<void> {
// BEGIN USER CODE
// Documentation https://github.com/zo0r/react-native-push-notification

const isIOS = Platform.OS === "ios";
if (NativeModules && isIOS && !NativeModules.RNCPushNotificationIOS) {
return Promise.reject(new Error("Notifications module is not available in your app"));
if (!body) {
throw new Error("Input parameter 'Body' is required");
}

if (!body) {
return Promise.reject(new Error("Input parameter 'Body' is required"));
// Documentation Documentation https://github.com/invertase/notifee
if (NativeModules && !NativeModules.NotifeeApiModule) {
return Promise.reject(new Error("Notifee native module is not available in your app"));
}

const notification = { message: body } as PushNotificationObject;
const channelId = playSound ? "mendix-local-notifications-withsound" : "mendix-local-notifications";
await createNotificationChannelIfNeeded(channelId);

if (!isIOS) {
const channelId = "mendix-local-notifications";
const channelExists = await new Promise(resolve =>
PushNotification.channelExists(channelId, (exists: boolean) => resolve(exists))
);
if (!channelExists) {
const channel = await new Promise(resolve =>
PushNotification.createChannel(
{
channelId,
channelName: "Local notifications"
},
created => resolve(created)
)
);
if (!channel) {
return Promise.reject(new Error("Could not create the local notifications channel"));
}
}
notification.channelId = channelId;
}
const notification: Notification = {
title: title || undefined,
body,
android: { channelId, sound: "default" },
ios: playSound ? { sound: "default" } : {}
};

if (title) {
notification.title = title;
if (subtitle && Platform.OS === "ios") {
notification.subtitle = subtitle;
}

if (subtitle && !isIOS) {
notification.subText = subtitle;
if (actionName || actionGuid) {
notification.data = {
actionName: actionName ?? "",
guid: actionGuid ?? ""
};
}

notification.playSound = !!playSound;
await notifee.displayNotification(notification);

if (actionName || actionGuid) {
notification.userInfo = {
actionName,
guid: actionGuid
async function createNotificationChannelIfNeeded(channelId: string): Promise<void> {
if (Platform.OS === "ios") {
return;
}
const existingChannel = await notifee.getChannel(channelId);
const channel: AndroidChannel = {
id: channelId,
name: "Local Notifications",
importance: AndroidImportance.HIGH,
...(playSound ? { sound: "default" } : {})
};
if (existingChannel === null) {
await notifee.createChannel(channel);
}
}

PushNotification.localNotification(notification);
return Promise.resolve();
// END USER CODE
}
Loading
Loading