Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Commit c4865aa

Browse files
committed
add example button to log scheduled notifications
1 parent d904712 commit c4865aa

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

example/App.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,13 @@ export default class App extends Component {
105105
}}>
106106
<Text>Abandon Permissions</Text>
107107
</TouchableOpacity>
108+
<TouchableOpacity
109+
style={styles.button}
110+
onPress={() => {
111+
this.notif.getScheduledLocalNotifications(notifs => console.log(notifs));
112+
}}>
113+
<Text>Console.Log Scheduled Local Notifications</Text>
114+
</TouchableOpacity>
108115

109116
<View style={styles.spacer}></View>
110117

example/NotifService.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,8 @@ export default class NotifService {
109109
abandonPermissions() {
110110
PushNotification.abandonPermissions();
111111
}
112+
113+
getScheduledLocalNotifications(callback) {
114+
PushNotification.getScheduledLocalNotifications(callback);
115+
}
112116
}

example/ios/Podfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ PODS:
292292
- React-cxxreact (= 0.62.2)
293293
- React-jsi (= 0.62.2)
294294
- ReactCommon/callinvoker (= 0.62.2)
295-
- RNCPushNotificationIOS (1.1.1):
295+
- RNCPushNotificationIOS (1.2.1):
296296
- React
297297
- Yoga (1.14.0)
298298
- YogaKit (1.18.1):
@@ -453,10 +453,10 @@ SPEC CHECKSUMS:
453453
React-RCTText: fae545b10cfdb3d247c36c56f61a94cfd6dba41d
454454
React-RCTVibration: 4356114dbcba4ce66991096e51a66e61eda51256
455455
ReactCommon: ed4e11d27609d571e7eee8b65548efc191116eb3
456-
RNCPushNotificationIOS: a0b6894f4ad9b93d9dac467fdf4d055660ac8a0d
456+
RNCPushNotificationIOS: 5878fb73cb1a8a78c3a1a0834d969b01553836d0
457457
Yoga: 3ebccbdd559724312790e7742142d062476b698e
458458
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
459459

460460
PODFILE CHECKSUM: 56c2537f71f3f02200d6918c542a8e89a0b422fa
461461

462-
COCOAPODS: 1.9.1
462+
COCOAPODS: 1.9.2

example/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"ios": "react-native run-ios",
88
"start": "react-native start",
99
"test": "jest",
10-
"lint": "eslint ."
10+
"lint": "eslint .",
11+
"pod-install": "cd ios && pod install"
1112
},
1213
"dependencies": {
1314
"@react-native-community/push-notification-ios": "^1.1.1",

0 commit comments

Comments
 (0)