Skip to content

Commit c2a4095

Browse files
committed
fix: conditionally import RN schedule exact alarm
1 parent 20e7d57 commit c2a4095

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

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

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

77
## [Unreleased]
88

9-
## [4.1.0] Native Mobile Resources - 2024-5-28
9+
- We have fixed an issue with checking blocked permissions on iOS
1010

11+
## [4.1.0] Native Mobile Resources - 2024-5-28
1112

1213
### Changed
1314

1415
- Added CheckGenericPermission and updated RequestGenericPermission to support SCHEDULE_EXACT_ALARM_ANDROID permission for Android (relevant for Android 14).
1516

1617
## [4.0.9] Native Mobile Resources - 2024-4-4
1718

18-
1919
## [4.0.1] FloatingActionButton
20+
2021
### Fixed
2122

2223
- We have fixed an issue where icons within Floating Action Buttons were not properly centered.
2324

2425
## [4.0.8] Native Mobile Resources - 2024-3-29
26+
2527
### Changed
2628

2729
- fixed an Android issue in Download file action.
2830

2931
## [4.0.7] Native Mobile Resources - 2024-2-26
3032

31-
3233
## [2.2.1] Accordion
34+
3335
### Fixed
3436

3537
- Fixed a bug where the accordion state was not updating correctly when the "Collapsed" attribute was selected.
@@ -38,8 +40,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
3840

3941
## [4.0.6] Native Mobile Resources - 2024-2-12
4042

41-
4243
## [1.0.3] Gallery
44+
4345
### Fixed
4446

4547
- We've resolved an issue where the loading indicator was triggered when pulling down the list, even in the absence of a pull-down event.

packages/jsActions/mobile-resources-native/src/permissions/RequestGenericPermission.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import {
1414
Permission,
1515
PERMISSIONS as RNPermissions
1616
} from "react-native-permissions";
17-
import { getPermission } from "react-native-schedule-exact-alarm-permission";
1817
import { ANDROIDPermissionName, IOSPermissionName } from "../../typings/RequestGenericPermission";
1918

2019
// BEGIN EXTRA CODE
@@ -31,8 +30,10 @@ function handleBlockedPermission(permission: string): void {
3130
const permissionName = permission.replace(/_IOS|_ANDROID/, "");
3231

3332
if (permissionName === "SCHEDULE_EXACT_ALARM") {
33+
const RNExactAlarmPermission = require("react-native-schedule-exact-alarm-permission");
34+
3435
Alert.alert("", "Please allow setting alarms and reminders", [
35-
{ text: "Go to alarm settings", onPress: () => getPermission(), isPreferred: true },
36+
{ text: "Go to alarm settings", onPress: () => RNExactAlarmPermission.getPermission(), isPreferred: true },
3637
{ text: "Cancel", style: "cancel" }
3738
]);
3839
} else {

0 commit comments

Comments
 (0)