Skip to content

Native Mobile Resources: Updating changelogs #289

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion configs/e2e/mendix-versions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"latest": "11.0.0.73100"
"latest": "10.24.0.73019"
}
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": "14.0.4",
"react-native-device-info": "13.0.0",
"react-native-action-button": "2.8.5",
"react-native-material-menu": "1.2.0",
"react-native-linear-gradient": "2.8.3",
"react-native-linear-gradient": "2.5.6",
"@react-native-community/netinfo": "11.4.1",
"react-native-svg": "15.11.1",
"react-native-system-navigation-bar": "2.6.3",
Expand Down
19 changes: 19 additions & 0 deletions packages/jsActions/mobile-resources-native/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,25 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

## [10.1.1] Native Mobile Resources - 2025-7-17


## [4.0.1] IntroScreen
### Fixed

- We have fixed defaultProps deprecation warning.

- Initial slide now correctly positioned on mount.

## [3.1.0] SafeAreaView
- We fixed the issue where the header is going outside of page in some android versions.

## [2.3.0] Signature
- Updated react-native-webview from version v13.12.5 to latest

## [4.3.0] WebView
- Updated react-native-webview from version v13.12.5 to latest to support react-native 0.77

## [10.0.0] Native Mobile Resources - 2025-3-31
- We migrated from react-native-inappbrowser-reborn to @swan-io/react-native-browser to prevent issues for next rn upgrade.

Expand Down
16 changes: 9 additions & 7 deletions packages/jsActions/mobile-resources-native/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "mobile-resources-native",
"moduleName": "Native Mobile Resources",
"version": "10.0.0",
"version": "10.1.1",
"license": "Apache-2.0",
"copyright": "© Mendix Technology BV 2022. All rights reserved.",
"repository": {
"type": "git",
"url": "https://github.com/mendix/native-widgets.git"
},
"marketplace": {
"minimumMXVersion": "11.0.0.73100",
"minimumMXVersion": "10.24.0.73019",
"marketplaceId": 109513
},
"testProject": {
Expand All @@ -26,30 +26,32 @@
"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": "14.0.4",
"react-native-device-info": "13.0.0",
"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",
"rimraf": "^4.4.1",
"rollup": "^2.79.2"
}
}
}
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 ReactNativeBiometrics from "react-native-biometrics";
import TouchID from "react-native-touch-id";

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

const rnBiometrics = new ReactNativeBiometrics();

return rnBiometrics
.simplePrompt({ promptMessage: reason ?? "" })
return TouchID.authenticate(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 ReactNativeBiometrics from "react-native-biometrics";
import TouchID from "react-native-touch-id";

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

const rnBiometrics = new ReactNativeBiometrics();

return rnBiometrics
.isSensorAvailable()
.then(result => result.available)
return TouchID.isSupported()
.then(() => true)
.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 } from "react-native";
import notifee from "@notifee/react-native";
import { NativeModules, Platform } from "react-native";
import PushNotification from "react-native-push-notification";

// BEGIN EXTRA CODE
// END EXTRA CODE
Expand All @@ -17,12 +17,13 @@ import notifee from "@notifee/react-native";
*/
export async function CancelAllScheduledNotifications(): Promise<void> {
// BEGIN USER CODE
// Documentation https://github.com/invertase/notifee
if (NativeModules && !NativeModules.NotifeeApiModule) {
return Promise.reject(new Error("Notifee native module is not available in your app"));
// 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"));
}

notifee.cancelAllNotifications();
PushNotification.cancelAllLocalNotifications();
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 } from "react-native";
import notifee from "@notifee/react-native";
import { NativeModules, Platform } from "react-native";
import PushNotification from "react-native-push-notification";

// BEGIN EXTRA CODE
// END EXTRA CODE
Expand All @@ -17,16 +17,17 @@ import notifee from "@notifee/react-native";
*/
export async function CancelScheduledNotification(notificationId?: string): Promise<void> {
// BEGIN USER CODE
// 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"));
// 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 (!notificationId) {
return Promise.reject(new Error("Input parameter 'Notification id' is required"));
}

notifee.cancelNotification(notificationId);
PushNotification.cancelLocalNotification(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 } from "react-native";
import notifee from "@notifee/react-native";
import { NativeModules, Platform } from "react-native";
import PushNotification from "react-native-push-notification";

// BEGIN EXTRA CODE
// END EXTRA CODE
Expand All @@ -17,12 +17,13 @@ import notifee from "@notifee/react-native";
*/
export async function ClearAllDeliveredNotifications(): Promise<void> {
// BEGIN USER CODE
// 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"));
// 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"));
}

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

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 notifee, { AndroidChannel, AndroidImportance, Notification } from "@notifee/react-native";
import PushNotification, { PushNotificationObject } from "react-native-push-notification";

// BEGIN EXTRA CODE
// END EXTRA CODE
Expand All @@ -32,54 +32,59 @@ export async function DisplayNotification(
actionGuid?: string
): Promise<void> {
// BEGIN USER CODE
if (!body) {
throw new Error("Input parameter 'Body' is required");
// 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 (!body) {
return Promise.reject(new Error("Input parameter 'Body' is required"));
}

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

const notification: Notification = {
title: title || undefined,
body,
android: { channelId, sound: "default" },
ios: playSound ? { sound: "default" } : {}
};
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;
}

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

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

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

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 (actionName || actionGuid) {
notification.userInfo = {
actionName,
guid: actionGuid
};
if (existingChannel === null) {
await notifee.createChannel(channel);
}
}

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