diff --git a/CHANGELOG.gren.md b/CHANGELOG.gren.md
index fe324aa75..b686546f7 100644
--- a/CHANGELOG.gren.md
+++ b/CHANGELOG.gren.md
@@ -1,5 +1,13 @@
# Changelog
+## 4.1.1 (21/07/2021)
+
+#### Enhancements:
+
+- resiter remote on provisional approve [#759](https://github.com/wix/react-native-notifications/pull/759) by [DanielEliraz](https://github.com/DanielEliraz)
+
+---
+
## 4.1.0 (14/07/2021)
#### Enhancements:
@@ -123,6 +131,7 @@
#### Enhancements:
+- FEAT: ios add permissions to check permissions [#762](https://github.com/wix/react-native-notifications/pull/762) by [DanielEliraz](https://github.com/DanielEliraz)
- resiter remote on provisional approve [#759](https://github.com/wix/react-native-notifications/pull/759) by [DanielEliraz](https://github.com/DanielEliraz)
- expose provisional state [#756](https://github.com/wix/react-native-notifications/pull/756) by [DanielEliraz](https://github.com/DanielEliraz)
- Add ability to request/check more iOS permissions [#752](https://github.com/wix/react-native-notifications/pull/752) by [DanielEliraz](https://github.com/DanielEliraz)
@@ -159,10 +168,11 @@
---
-## 2.1.0 (31/12/1969)
+## v1.4.0 (31/12/1969)
#### Enhancements:
+- FEAT: ios add permissions to check permissions [#762](https://github.com/wix/react-native-notifications/pull/762) by [DanielEliraz](https://github.com/DanielEliraz)
- resiter remote on provisional approve [#759](https://github.com/wix/react-native-notifications/pull/759) by [DanielEliraz](https://github.com/DanielEliraz)
- expose provisional state [#756](https://github.com/wix/react-native-notifications/pull/756) by [DanielEliraz](https://github.com/DanielEliraz)
- Add ability to request/check more iOS permissions [#752](https://github.com/wix/react-native-notifications/pull/752) by [DanielEliraz](https://github.com/DanielEliraz)
@@ -199,10 +209,11 @@
---
-## v1.4.0 (31/12/1969)
+## v1.1.17 (31/12/1969)
#### Enhancements:
+- FEAT: ios add permissions to check permissions [#762](https://github.com/wix/react-native-notifications/pull/762) by [DanielEliraz](https://github.com/DanielEliraz)
- resiter remote on provisional approve [#759](https://github.com/wix/react-native-notifications/pull/759) by [DanielEliraz](https://github.com/DanielEliraz)
- expose provisional state [#756](https://github.com/wix/react-native-notifications/pull/756) by [DanielEliraz](https://github.com/DanielEliraz)
- Add ability to request/check more iOS permissions [#752](https://github.com/wix/react-native-notifications/pull/752) by [DanielEliraz](https://github.com/DanielEliraz)
@@ -239,10 +250,11 @@
---
-## v1.1.17 (31/12/1969)
+## v1.1.12 (31/12/1969)
#### Enhancements:
+- FEAT: ios add permissions to check permissions [#762](https://github.com/wix/react-native-notifications/pull/762) by [DanielEliraz](https://github.com/DanielEliraz)
- resiter remote on provisional approve [#759](https://github.com/wix/react-native-notifications/pull/759) by [DanielEliraz](https://github.com/DanielEliraz)
- expose provisional state [#756](https://github.com/wix/react-native-notifications/pull/756) by [DanielEliraz](https://github.com/DanielEliraz)
- Add ability to request/check more iOS permissions [#752](https://github.com/wix/react-native-notifications/pull/752) by [DanielEliraz](https://github.com/DanielEliraz)
@@ -279,10 +291,11 @@
---
-## v1.1.12 (31/12/1969)
+## 4.1.2 (31/12/1969)
#### Enhancements:
+- FEAT: ios add permissions to check permissions [#762](https://github.com/wix/react-native-notifications/pull/762) by [DanielEliraz](https://github.com/DanielEliraz)
- resiter remote on provisional approve [#759](https://github.com/wix/react-native-notifications/pull/759) by [DanielEliraz](https://github.com/DanielEliraz)
- expose provisional state [#756](https://github.com/wix/react-native-notifications/pull/756) by [DanielEliraz](https://github.com/DanielEliraz)
- Add ability to request/check more iOS permissions [#752](https://github.com/wix/react-native-notifications/pull/752) by [DanielEliraz](https://github.com/DanielEliraz)
@@ -319,10 +332,11 @@
---
-## 4.1.1 (31/12/1969)
+## 3.0.0-beta.4 (31/12/1969)
#### Enhancements:
+- FEAT: ios add permissions to check permissions [#762](https://github.com/wix/react-native-notifications/pull/762) by [DanielEliraz](https://github.com/DanielEliraz)
- resiter remote on provisional approve [#759](https://github.com/wix/react-native-notifications/pull/759) by [DanielEliraz](https://github.com/DanielEliraz)
- expose provisional state [#756](https://github.com/wix/react-native-notifications/pull/756) by [DanielEliraz](https://github.com/DanielEliraz)
- Add ability to request/check more iOS permissions [#752](https://github.com/wix/react-native-notifications/pull/752) by [DanielEliraz](https://github.com/DanielEliraz)
@@ -359,10 +373,11 @@
---
-## 3.0.0-beta.4 (31/12/1969)
+## 3.0.0-beta.2 (31/12/1969)
#### Enhancements:
+- FEAT: ios add permissions to check permissions [#762](https://github.com/wix/react-native-notifications/pull/762) by [DanielEliraz](https://github.com/DanielEliraz)
- resiter remote on provisional approve [#759](https://github.com/wix/react-native-notifications/pull/759) by [DanielEliraz](https://github.com/DanielEliraz)
- expose provisional state [#756](https://github.com/wix/react-native-notifications/pull/756) by [DanielEliraz](https://github.com/DanielEliraz)
- Add ability to request/check more iOS permissions [#752](https://github.com/wix/react-native-notifications/pull/752) by [DanielEliraz](https://github.com/DanielEliraz)
@@ -399,10 +414,11 @@
---
-## 3.0.0-beta.2 (31/12/1969)
+## 3.0.0 (31/12/1969)
#### Enhancements:
+- FEAT: ios add permissions to check permissions [#762](https://github.com/wix/react-native-notifications/pull/762) by [DanielEliraz](https://github.com/DanielEliraz)
- resiter remote on provisional approve [#759](https://github.com/wix/react-native-notifications/pull/759) by [DanielEliraz](https://github.com/DanielEliraz)
- expose provisional state [#756](https://github.com/wix/react-native-notifications/pull/756) by [DanielEliraz](https://github.com/DanielEliraz)
- Add ability to request/check more iOS permissions [#752](https://github.com/wix/react-native-notifications/pull/752) by [DanielEliraz](https://github.com/DanielEliraz)
@@ -439,10 +455,11 @@
---
-## 3.0.0 (31/12/1969)
+## 3.0.0-beta.1 (31/12/1969)
#### Enhancements:
+- FEAT: ios add permissions to check permissions [#762](https://github.com/wix/react-native-notifications/pull/762) by [DanielEliraz](https://github.com/DanielEliraz)
- resiter remote on provisional approve [#759](https://github.com/wix/react-native-notifications/pull/759) by [DanielEliraz](https://github.com/DanielEliraz)
- expose provisional state [#756](https://github.com/wix/react-native-notifications/pull/756) by [DanielEliraz](https://github.com/DanielEliraz)
- Add ability to request/check more iOS permissions [#752](https://github.com/wix/react-native-notifications/pull/752) by [DanielEliraz](https://github.com/DanielEliraz)
@@ -483,6 +500,7 @@
#### Enhancements:
+- FEAT: ios add permissions to check permissions [#762](https://github.com/wix/react-native-notifications/pull/762) by [DanielEliraz](https://github.com/DanielEliraz)
- resiter remote on provisional approve [#759](https://github.com/wix/react-native-notifications/pull/759) by [DanielEliraz](https://github.com/DanielEliraz)
- expose provisional state [#756](https://github.com/wix/react-native-notifications/pull/756) by [DanielEliraz](https://github.com/DanielEliraz)
- Add ability to request/check more iOS permissions [#752](https://github.com/wix/react-native-notifications/pull/752) by [DanielEliraz](https://github.com/DanielEliraz)
@@ -519,10 +537,11 @@
---
-## 3.0.0-beta.1 (31/12/1969)
+## 3.0.0-beta.0 (31/12/1969)
#### Enhancements:
+- FEAT: ios add permissions to check permissions [#762](https://github.com/wix/react-native-notifications/pull/762) by [DanielEliraz](https://github.com/DanielEliraz)
- resiter remote on provisional approve [#759](https://github.com/wix/react-native-notifications/pull/759) by [DanielEliraz](https://github.com/DanielEliraz)
- expose provisional state [#756](https://github.com/wix/react-native-notifications/pull/756) by [DanielEliraz](https://github.com/DanielEliraz)
- Add ability to request/check more iOS permissions [#752](https://github.com/wix/react-native-notifications/pull/752) by [DanielEliraz](https://github.com/DanielEliraz)
@@ -559,10 +578,11 @@
---
-## 3.0.0-beta.0 (31/12/1969)
+## 3.0.0-alpha.0 (31/12/1969)
#### Enhancements:
+- FEAT: ios add permissions to check permissions [#762](https://github.com/wix/react-native-notifications/pull/762) by [DanielEliraz](https://github.com/DanielEliraz)
- resiter remote on provisional approve [#759](https://github.com/wix/react-native-notifications/pull/759) by [DanielEliraz](https://github.com/DanielEliraz)
- expose provisional state [#756](https://github.com/wix/react-native-notifications/pull/756) by [DanielEliraz](https://github.com/DanielEliraz)
- Add ability to request/check more iOS permissions [#752](https://github.com/wix/react-native-notifications/pull/752) by [DanielEliraz](https://github.com/DanielEliraz)
@@ -599,10 +619,11 @@
---
-## 3.0.0-alpha.0 (31/12/1969)
+## 2.1.7 (31/12/1969)
#### Enhancements:
+- FEAT: ios add permissions to check permissions [#762](https://github.com/wix/react-native-notifications/pull/762) by [DanielEliraz](https://github.com/DanielEliraz)
- resiter remote on provisional approve [#759](https://github.com/wix/react-native-notifications/pull/759) by [DanielEliraz](https://github.com/DanielEliraz)
- expose provisional state [#756](https://github.com/wix/react-native-notifications/pull/756) by [DanielEliraz](https://github.com/DanielEliraz)
- Add ability to request/check more iOS permissions [#752](https://github.com/wix/react-native-notifications/pull/752) by [DanielEliraz](https://github.com/DanielEliraz)
@@ -639,10 +660,11 @@
---
-## 2.1.7 (31/12/1969)
+## 2.1.6 (31/12/1969)
#### Enhancements:
+- FEAT: ios add permissions to check permissions [#762](https://github.com/wix/react-native-notifications/pull/762) by [DanielEliraz](https://github.com/DanielEliraz)
- resiter remote on provisional approve [#759](https://github.com/wix/react-native-notifications/pull/759) by [DanielEliraz](https://github.com/DanielEliraz)
- expose provisional state [#756](https://github.com/wix/react-native-notifications/pull/756) by [DanielEliraz](https://github.com/DanielEliraz)
- Add ability to request/check more iOS permissions [#752](https://github.com/wix/react-native-notifications/pull/752) by [DanielEliraz](https://github.com/DanielEliraz)
@@ -683,6 +705,7 @@
#### Enhancements:
+- FEAT: ios add permissions to check permissions [#762](https://github.com/wix/react-native-notifications/pull/762) by [DanielEliraz](https://github.com/DanielEliraz)
- resiter remote on provisional approve [#759](https://github.com/wix/react-native-notifications/pull/759) by [DanielEliraz](https://github.com/DanielEliraz)
- expose provisional state [#756](https://github.com/wix/react-native-notifications/pull/756) by [DanielEliraz](https://github.com/DanielEliraz)
- Add ability to request/check more iOS permissions [#752](https://github.com/wix/react-native-notifications/pull/752) by [DanielEliraz](https://github.com/DanielEliraz)
@@ -719,10 +742,11 @@
---
-## 2.1.6 (31/12/1969)
+## 2.1.5 (31/12/1969)
#### Enhancements:
+- FEAT: ios add permissions to check permissions [#762](https://github.com/wix/react-native-notifications/pull/762) by [DanielEliraz](https://github.com/DanielEliraz)
- resiter remote on provisional approve [#759](https://github.com/wix/react-native-notifications/pull/759) by [DanielEliraz](https://github.com/DanielEliraz)
- expose provisional state [#756](https://github.com/wix/react-native-notifications/pull/756) by [DanielEliraz](https://github.com/DanielEliraz)
- Add ability to request/check more iOS permissions [#752](https://github.com/wix/react-native-notifications/pull/752) by [DanielEliraz](https://github.com/DanielEliraz)
@@ -759,10 +783,11 @@
---
-## 2.1.5 (31/12/1969)
+## 2.1.4 (31/12/1969)
#### Enhancements:
+- FEAT: ios add permissions to check permissions [#762](https://github.com/wix/react-native-notifications/pull/762) by [DanielEliraz](https://github.com/DanielEliraz)
- resiter remote on provisional approve [#759](https://github.com/wix/react-native-notifications/pull/759) by [DanielEliraz](https://github.com/DanielEliraz)
- expose provisional state [#756](https://github.com/wix/react-native-notifications/pull/756) by [DanielEliraz](https://github.com/DanielEliraz)
- Add ability to request/check more iOS permissions [#752](https://github.com/wix/react-native-notifications/pull/752) by [DanielEliraz](https://github.com/DanielEliraz)
@@ -799,10 +824,11 @@
---
-## 2.1.4 (31/12/1969)
+## 2.1.4-beta.0 (31/12/1969)
#### Enhancements:
+- FEAT: ios add permissions to check permissions [#762](https://github.com/wix/react-native-notifications/pull/762) by [DanielEliraz](https://github.com/DanielEliraz)
- resiter remote on provisional approve [#759](https://github.com/wix/react-native-notifications/pull/759) by [DanielEliraz](https://github.com/DanielEliraz)
- expose provisional state [#756](https://github.com/wix/react-native-notifications/pull/756) by [DanielEliraz](https://github.com/DanielEliraz)
- Add ability to request/check more iOS permissions [#752](https://github.com/wix/react-native-notifications/pull/752) by [DanielEliraz](https://github.com/DanielEliraz)
@@ -839,10 +865,11 @@
---
-## 2.1.4-beta.0 (31/12/1969)
+## 2.1.3 (31/12/1969)
#### Enhancements:
+- FEAT: ios add permissions to check permissions [#762](https://github.com/wix/react-native-notifications/pull/762) by [DanielEliraz](https://github.com/DanielEliraz)
- resiter remote on provisional approve [#759](https://github.com/wix/react-native-notifications/pull/759) by [DanielEliraz](https://github.com/DanielEliraz)
- expose provisional state [#756](https://github.com/wix/react-native-notifications/pull/756) by [DanielEliraz](https://github.com/DanielEliraz)
- Add ability to request/check more iOS permissions [#752](https://github.com/wix/react-native-notifications/pull/752) by [DanielEliraz](https://github.com/DanielEliraz)
@@ -879,10 +906,11 @@
---
-## 2.1.3 (31/12/1969)
+## 2.1.0 (31/12/1969)
#### Enhancements:
+- FEAT: ios add permissions to check permissions [#762](https://github.com/wix/react-native-notifications/pull/762) by [DanielEliraz](https://github.com/DanielEliraz)
- resiter remote on provisional approve [#759](https://github.com/wix/react-native-notifications/pull/759) by [DanielEliraz](https://github.com/DanielEliraz)
- expose provisional state [#756](https://github.com/wix/react-native-notifications/pull/756) by [DanielEliraz](https://github.com/DanielEliraz)
- Add ability to request/check more iOS permissions [#752](https://github.com/wix/react-native-notifications/pull/752) by [DanielEliraz](https://github.com/DanielEliraz)
@@ -923,6 +951,7 @@
#### Enhancements:
+- FEAT: ios add permissions to check permissions [#762](https://github.com/wix/react-native-notifications/pull/762) by [DanielEliraz](https://github.com/DanielEliraz)
- resiter remote on provisional approve [#759](https://github.com/wix/react-native-notifications/pull/759) by [DanielEliraz](https://github.com/DanielEliraz)
- expose provisional state [#756](https://github.com/wix/react-native-notifications/pull/756) by [DanielEliraz](https://github.com/DanielEliraz)
- Add ability to request/check more iOS permissions [#752](https://github.com/wix/react-native-notifications/pull/752) by [DanielEliraz](https://github.com/DanielEliraz)
@@ -963,6 +992,7 @@
#### Enhancements:
+- FEAT: ios add permissions to check permissions [#762](https://github.com/wix/react-native-notifications/pull/762) by [DanielEliraz](https://github.com/DanielEliraz)
- resiter remote on provisional approve [#759](https://github.com/wix/react-native-notifications/pull/759) by [DanielEliraz](https://github.com/DanielEliraz)
- expose provisional state [#756](https://github.com/wix/react-native-notifications/pull/756) by [DanielEliraz](https://github.com/DanielEliraz)
- Add ability to request/check more iOS permissions [#752](https://github.com/wix/react-native-notifications/pull/752) by [DanielEliraz](https://github.com/DanielEliraz)
@@ -1003,6 +1033,7 @@
#### Enhancements:
+- FEAT: ios add permissions to check permissions [#762](https://github.com/wix/react-native-notifications/pull/762) by [DanielEliraz](https://github.com/DanielEliraz)
- resiter remote on provisional approve [#759](https://github.com/wix/react-native-notifications/pull/759) by [DanielEliraz](https://github.com/DanielEliraz)
- expose provisional state [#756](https://github.com/wix/react-native-notifications/pull/756) by [DanielEliraz](https://github.com/DanielEliraz)
- Add ability to request/check more iOS permissions [#752](https://github.com/wix/react-native-notifications/pull/752) by [DanielEliraz](https://github.com/DanielEliraz)
@@ -1043,6 +1074,7 @@
#### Enhancements:
+- FEAT: ios add permissions to check permissions [#762](https://github.com/wix/react-native-notifications/pull/762) by [DanielEliraz](https://github.com/DanielEliraz)
- resiter remote on provisional approve [#759](https://github.com/wix/react-native-notifications/pull/759) by [DanielEliraz](https://github.com/DanielEliraz)
- expose provisional state [#756](https://github.com/wix/react-native-notifications/pull/756) by [DanielEliraz](https://github.com/DanielEliraz)
- Add ability to request/check more iOS permissions [#752](https://github.com/wix/react-native-notifications/pull/752) by [DanielEliraz](https://github.com/DanielEliraz)
@@ -1083,6 +1115,7 @@
#### Enhancements:
+- FEAT: ios add permissions to check permissions [#762](https://github.com/wix/react-native-notifications/pull/762) by [DanielEliraz](https://github.com/DanielEliraz)
- resiter remote on provisional approve [#759](https://github.com/wix/react-native-notifications/pull/759) by [DanielEliraz](https://github.com/DanielEliraz)
- expose provisional state [#756](https://github.com/wix/react-native-notifications/pull/756) by [DanielEliraz](https://github.com/DanielEliraz)
- Add ability to request/check more iOS permissions [#752](https://github.com/wix/react-native-notifications/pull/752) by [DanielEliraz](https://github.com/DanielEliraz)
@@ -1123,6 +1156,7 @@
#### Enhancements:
+- FEAT: ios add permissions to check permissions [#762](https://github.com/wix/react-native-notifications/pull/762) by [DanielEliraz](https://github.com/DanielEliraz)
- resiter remote on provisional approve [#759](https://github.com/wix/react-native-notifications/pull/759) by [DanielEliraz](https://github.com/DanielEliraz)
- expose provisional state [#756](https://github.com/wix/react-native-notifications/pull/756) by [DanielEliraz](https://github.com/DanielEliraz)
- Add ability to request/check more iOS permissions [#752](https://github.com/wix/react-native-notifications/pull/752) by [DanielEliraz](https://github.com/DanielEliraz)
@@ -1163,6 +1197,7 @@
#### Enhancements:
+- FEAT: ios add permissions to check permissions [#762](https://github.com/wix/react-native-notifications/pull/762) by [DanielEliraz](https://github.com/DanielEliraz)
- resiter remote on provisional approve [#759](https://github.com/wix/react-native-notifications/pull/759) by [DanielEliraz](https://github.com/DanielEliraz)
- expose provisional state [#756](https://github.com/wix/react-native-notifications/pull/756) by [DanielEliraz](https://github.com/DanielEliraz)
- Add ability to request/check more iOS permissions [#752](https://github.com/wix/react-native-notifications/pull/752) by [DanielEliraz](https://github.com/DanielEliraz)
diff --git a/example/index.js b/example/index.js
index 3d097fbbf..94bd0e261 100644
--- a/example/index.js
+++ b/example/index.js
@@ -154,6 +154,12 @@ class NotificationsExampleApp extends Component {
});
}
+ isRegistered() {
+ Notifications.isRegisteredForRemoteNotifications().then((registered) => {
+ console.warn(registered);
+ });
+ }
+
render() {
const notifications = this.state.notifications.map((notification, idx) =>
(
@@ -181,6 +187,7 @@ class NotificationsExampleApp extends Component {
}
+
{notifications}
{openedNotifications}
diff --git a/lib/ios/RNNotificationCenter.m b/lib/ios/RNNotificationCenter.m
index 745252331..4b3365625 100644
--- a/lib/ios/RNNotificationCenter.m
+++ b/lib/ios/RNNotificationCenter.m
@@ -109,6 +109,8 @@ - (void)checkPermissions:(RCTPromiseResolveBlock)resolve {
@"sound": [NSNumber numberWithBool:settings.soundSetting == UNNotificationSettingEnabled],
@"alert": [NSNumber numberWithBool:settings.alertSetting == UNNotificationSettingEnabled],
@"carPlay": [NSNumber numberWithBool:settings.carPlaySetting == UNNotificationSettingEnabled],
+ @"notificationCenter": [NSNumber numberWithBool:settings.notificationCenterSetting == UNNotificationSettingEnabled],
+ @"lockScreen": [NSNumber numberWithBool:settings.lockScreenSetting == UNNotificationSettingEnabled],
}];
if (@available(iOS 12.0, *)) {
allSettings[@"criticalAlert"] = [NSNumber numberWithBool:settings.criticalAlertSetting == UNNotificationSettingEnabled];
diff --git a/lib/src/commands/Commands.test.ts b/lib/src/commands/Commands.test.ts
index 0f644b018..0fb6cbaa1 100644
--- a/lib/src/commands/Commands.test.ts
+++ b/lib/src/commands/Commands.test.ts
@@ -244,6 +244,8 @@ describe('Commands', () => {
providesAppNotificationSettings: false,
provisional: false,
announcement: false,
+ notificationCenter: true,
+ lockScreen: false,
};
when(mockedNativeCommandsSender.checkPermissions()).thenResolve(
expectedPermissions
diff --git a/lib/src/interfaces/NotificationPermissions.ts b/lib/src/interfaces/NotificationPermissions.ts
index bd984065b..fb12ac314 100644
--- a/lib/src/interfaces/NotificationPermissions.ts
+++ b/lib/src/interfaces/NotificationPermissions.ts
@@ -9,4 +9,6 @@ export interface NotificationPermissions extends NotificationPermissionOptions
badge: boolean;
alert: boolean;
sound: boolean;
+ notificationCenter: boolean;
+ lockScreen: boolean;
}
\ No newline at end of file
diff --git a/package.json b/package.json
index c553c7474..870962c9e 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "react-native-notifications",
- "version": "4.1.1",
+ "version": "4.1.2",
"description": "Advanced Push Notifications (Silent, interactive notifications) for iOS & Android",
"author": "Lidan Hifi ",
"license": "MIT",