Skip to content

Commit

Permalink
Rename providesAppNotificationSettings -> providesAppSettings
Browse files Browse the repository at this point in the history
  • Loading branch information
zoontek committed Feb 23, 2022
1 parent 24f2284 commit 245d4ec
Show file tree
Hide file tree
Showing 9 changed files with 2,521 additions and 2,539 deletions.
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ type NotificationSettings = {
provisional?: boolean;
lockScreen?: boolean;
notificationCenter?: boolean;
providesAppNotificationSettings?: boolean;
providesAppSettings?: boolean;
};

function checkNotifications(): Promise<{
Expand Down Expand Up @@ -784,7 +784,14 @@ You cannot request notifications permissions on Android. `requestNotifications`

```ts
// only used on iOS
type NotificationOption = 'alert' | 'badge' | 'sound' | 'criticalAlert' | 'carPlay' | 'provisional' | 'providesAppNotificationSettings';
type NotificationOption =
| 'alert'
| 'badge'
| 'sound'
| 'criticalAlert'
| 'carPlay'
| 'provisional'
| 'providesAppSettings';

type NotificationSettings = {
// properties only available on iOS
Expand All @@ -797,7 +804,7 @@ type NotificationSettings = {
provisional?: boolean;
lockScreen?: boolean;
notificationCenter?: boolean;
providesAppNotificationSettings?: boolean;
providesAppSettings?: boolean;
};

function requestNotifications(options: NotificationOption[]): Promise<{
Expand Down
4 changes: 2 additions & 2 deletions example/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export const App = () => {

<TouchableRipple
onPress={() => {
RNPermissions.requestNotifications(['alert', 'badge', 'sound', 'providesAppNotificationSettings'])
RNPermissions.requestNotifications(['alert', 'badge', 'sound', 'providesAppSettings'])
.then(check)
.catch((error) => console.error(error));
}}
Expand All @@ -156,7 +156,7 @@ export const App = () => {
{`provisional: ${notifications.settings.provisional}\n`}
{`lockScreen: ${notifications.settings.lockScreen}\n`}
{`notificationCenter: ${notifications.settings.notificationCenter}\n`}
{`providesAppNotificationSettings: ${notifications.settings.providesAppNotificationSettings}\n`}
{`providesAppSettings: ${notifications.settings.providesAppSettings}\n`}
</Text>
)}
</>
Expand Down
76 changes: 38 additions & 38 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,41 +11,41 @@ PODS:
- ReactCommon/turbomodule/core (= 0.66.4)
- fmt (6.2.1)
- glog (0.3.5)
- Permission-AppTrackingTransparency (3.2.0):
- Permission-AppTrackingTransparency (3.3.0):
- RNPermissions
- Permission-BluetoothPeripheral (3.2.0):
- Permission-BluetoothPeripheral (3.3.0):
- RNPermissions
- Permission-Calendars (3.2.0):
- Permission-Calendars (3.3.0):
- RNPermissions
- Permission-Camera (3.2.0):
- Permission-Camera (3.3.0):
- RNPermissions
- Permission-Contacts (3.2.0):
- Permission-Contacts (3.3.0):
- RNPermissions
- Permission-FaceID (3.2.0):
- Permission-FaceID (3.3.0):
- RNPermissions
- Permission-LocationAccuracy (3.2.0):
- Permission-LocationAccuracy (3.3.0):
- RNPermissions
- Permission-LocationAlways (3.2.0):
- Permission-LocationAlways (3.3.0):
- RNPermissions
- Permission-LocationWhenInUse (3.2.0):
- Permission-LocationWhenInUse (3.3.0):
- RNPermissions
- Permission-MediaLibrary (3.2.0):
- Permission-MediaLibrary (3.3.0):
- RNPermissions
- Permission-Microphone (3.2.0):
- Permission-Microphone (3.3.0):
- RNPermissions
- Permission-Motion (3.2.0):
- Permission-Motion (3.3.0):
- RNPermissions
- Permission-Notifications (3.2.0):
- Permission-Notifications (3.3.0):
- RNPermissions
- Permission-PhotoLibrary (3.2.0):
- Permission-PhotoLibrary (3.3.0):
- RNPermissions
- Permission-PhotoLibraryAddOnly (3.2.0):
- Permission-PhotoLibraryAddOnly (3.3.0):
- RNPermissions
- Permission-Reminders (3.2.0):
- Permission-Reminders (3.3.0):
- RNPermissions
- Permission-SpeechRecognition (3.2.0):
- Permission-SpeechRecognition (3.3.0):
- RNPermissions
- Permission-StoreKit (3.2.0):
- Permission-StoreKit (3.3.0):
- RNPermissions
- RCT-Folly (2021.06.28.00-v2):
- boost
Expand Down Expand Up @@ -310,7 +310,7 @@ PODS:
- React-jsi (= 0.66.4)
- React-logger (= 0.66.4)
- React-perflogger (= 0.66.4)
- RNPermissions (3.2.0):
- RNPermissions (3.3.0):
- React-Core
- RNVectorIcons (8.1.0):
- React-Core
Expand Down Expand Up @@ -483,24 +483,24 @@ SPEC CHECKSUMS:
FBReactNativeSpec: fe08c1cd7e2e205718d77ad14b34957cce949b58
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
glog: 5337263514dd6f09803962437687240c5dc39aa4
Permission-AppTrackingTransparency: 95c9308dd40819fa9f6830751d0ef3ea11498723
Permission-BluetoothPeripheral: dd2663f81d622c9d153a2aacd7e3de0d59f7b4b6
Permission-Calendars: b2c5f5e0b53403d195f9ac78114731682a9a0e91
Permission-Camera: 53efcbb755b0e8bdf253dbb27cc7559ccfce8480
Permission-Contacts: 3919ddcaa62d6dc4320d41a27883b6f734a76fa4
Permission-FaceID: e3d306dc6284b8985beb608b033817900388cbb8
Permission-LocationAccuracy: c13bf629b614be250031458cf81d6a2e9dcdf64f
Permission-LocationAlways: 012fd2c1f610068c5f9a7b48bc908ea41edd0c43
Permission-LocationWhenInUse: 13de9a01e006cb53a6ac3c9f8d1ab6cc98318d9c
Permission-MediaLibrary: d35adbe2a069f2e16121fd79cf15959e86a3f74a
Permission-Microphone: db557c64f7e9ad41bff6b3f6d93df3b67311855b
Permission-Motion: 4a699388cd4fd57db51eb4e0a34d6e66a0268f61
Permission-Notifications: bb420c3d28328df24de1b476b41ed8249ccf2537
Permission-PhotoLibrary: 7bec836dcdd04a0bfb200c314f1aae06d4476357
Permission-PhotoLibraryAddOnly: 06fb0cdb1d35683b235ad8c464ef0ecc88859ea3
Permission-Reminders: 3c2d5d1e9c4b9fe90f937a23cbec9d8cf5ba52fd
Permission-SpeechRecognition: bfb038564b6f3a6e5dcf8d848171c32ae09d949c
Permission-StoreKit: ee68e7b70e9c44c2b16c6add64ddc58bd54c81c6
Permission-AppTrackingTransparency: c669dda9631d6cb5e3ce8b4764d68097ffb360d2
Permission-BluetoothPeripheral: ee2c235581da52db647b2f383cbcdc037ca72326
Permission-Calendars: 54cd96108f1734496d7dbfb6ac26d56e920e930e
Permission-Camera: 597646618d1edcc055a3f660844c2ee6de8e0596
Permission-Contacts: 8ceb322105c234fd41cbe5f4329bbf9ebcb7df21
Permission-FaceID: 000e0070e445d69da5860494c4323619493f15a5
Permission-LocationAccuracy: 2dd707dcda613cd1f997ba3430d8451bbf628b59
Permission-LocationAlways: dc302c06bead91cc4e0076c21393d0b8573caa6a
Permission-LocationWhenInUse: 9be81f411058a40ef6616825062fc74cec660cc9
Permission-MediaLibrary: 4acaae8adc5986d9d110f75315108a1acd74e5dd
Permission-Microphone: 964f87c350f8bc7aa163700a9736dd33c028817a
Permission-Motion: 637b9e51ee19b10039e9fd9e6cb299d33f9005c9
Permission-Notifications: ae00347c7a9efdfaa1a0138e59e37c8f0f3ede0b
Permission-PhotoLibrary: 33911b5522ee5978fcabe25d604756135325d067
Permission-PhotoLibraryAddOnly: 4d5e8e4b193221641dedcc9d640375f9429e87b0
Permission-Reminders: d3a829967ddeb506980690aac637525d23c8c0f1
Permission-SpeechRecognition: d5ce2da7f10585790e63ccb2353aa701c94088ce
Permission-StoreKit: 6ee6cc240d4f07dd7c99070f66c146521f8fc9af
RCT-Folly: a21c126816d8025b547704b777a2ba552f3d9fa9
RCTRequired: 4bf86c70714490bca4bf2696148638284622644b
RCTTypeSafety: c475a7059eb77935fa53d2c17db299893f057d5d
Expand All @@ -525,7 +525,7 @@ SPEC CHECKSUMS:
React-RCTVibration: e3ffca672dd3772536cb844274094b0e2c31b187
React-runtimeexecutor: dec32ee6f2e2a26e13e58152271535fadff5455a
ReactCommon: 57b69f6383eafcbd7da625bfa6003810332313c4
RNPermissions: f7ebe52db07c00901127966ca080b4ec6a6ceb0a
RNPermissions: bcd846e8f5a7f39e921cc7ca7172e2de0e698b6f
RNVectorIcons: 31cebfcf94e8cf8686eb5303ae0357da64d7a5a4
Yoga: e7dc4e71caba6472ff48ad7d234389b91dadc280

Expand Down
22 changes: 11 additions & 11 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,25 @@
"dependencies": {
"react": "17.0.2",
"react-native": "0.66.4",
"react-native-paper": "4.11.0",
"react-native-paper": "4.11.2",
"react-native-permissions": "../",
"react-native-vector-icons": "8.1.0",
"react-native-windows": "^0.62.0-0"
},
"devDependencies": {
"@babel/core": "7.16.0",
"@babel/runtime": "7.16.3",
"@types/jest": "27.0.3",
"@types/react": "17.0.37",
"@types/react-native": "0.66.8",
"@babel/core": "7.17.5",
"@babel/runtime": "7.17.2",
"@types/jest": "27.4.1",
"@types/react": "17.0.39",
"@types/react-native": "0.66.16",
"@types/react-test-renderer": "17.0.1",
"appium": "1.22.1",
"babel-jest": "27.4.4",
"jest": "27.4.4",
"appium": "1.22.2",
"babel-jest": "27.5.1",
"jest": "27.5.1",
"metro-react-native-babel-preset": "0.66.2",
"react-test-renderer": "17.0.2",
"selenium-appium": "1.0.2",
"selenium-webdriver": "4.1.0",
"typescript": "4.5.3"
"selenium-webdriver": "4.1.1",
"typescript": "4.5.5"
}
}
Loading

0 comments on commit 245d4ec

Please sign in to comment.