diff options
-rw-r--r-- | ios/Podfile.lock | 6 | ||||
-rw-r--r-- | package.json | 2 | ||||
-rw-r--r-- | src/screens/main/NotificationsScreen.tsx | 2 | ||||
-rw-r--r-- | yarn.lock | 12 |
4 files changed, 22 insertions, 0 deletions
diff --git a/ios/Podfile.lock b/ios/Podfile.lock index a971c65c..6fef22e4 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -433,6 +433,8 @@ PODS: - React-Core - RNCMaskedView (0.1.11): - React + - RNCPushNotificationIOS (1.8.0): + - React-Core - RNDeviceInfo (7.4.0): - React-Core - RNFBAnalytics (11.5.0): @@ -573,6 +575,7 @@ DEPENDENCIES: - rn-fetch-blob (from `../node_modules/rn-fetch-blob`) - "RNCAsyncStorage (from `../node_modules/@react-native-community/async-storage`)" - "RNCMaskedView (from `../node_modules/@react-native-community/masked-view`)" + - "RNCPushNotificationIOS (from `../node_modules/@react-native-community/push-notification-ios`)" - RNDeviceInfo (from `../node_modules/react-native-device-info`) - "RNFBAnalytics (from `../node_modules/@react-native-firebase/analytics`)" - "RNFBApp (from `../node_modules/@react-native-firebase/app`)" @@ -707,6 +710,8 @@ EXTERNAL SOURCES: :path: "../node_modules/@react-native-community/async-storage" RNCMaskedView: :path: "../node_modules/@react-native-community/masked-view" + RNCPushNotificationIOS: + :path: "../node_modules/@react-native-community/push-notification-ios" RNDeviceInfo: :path: "../node_modules/react-native-device-info" RNFBAnalytics: @@ -806,6 +811,7 @@ SPEC CHECKSUMS: rn-fetch-blob: f065bb7ab7fb48dd002629f8bdcb0336602d3cba RNCAsyncStorage: b03032fdbdb725bea0bd9e5ec5a7272865ae7398 RNCMaskedView: 0e1bc4bfa8365eba5fbbb71e07fbdc0555249489 + RNCPushNotificationIOS: 61a7c72bd1ebad3568025957d001e0f0e7b32191 RNDeviceInfo: 9538a884f862fe4aa0d7cead9f34e292d41ba8f6 RNFBAnalytics: dd54ace7b5b1ced65640f328fe1bd04a7e773dcf RNFBApp: 02bde3edecf2e9694b908a5d3504e03449980f20 diff --git a/package.json b/package.json index f44c3dd8..fea5aa11 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "@react-native-community/cameraroll": "^4.0.4", "@react-native-community/masked-view": "^0.1.10", "@react-native-community/netinfo": "^6.0.0", + "@react-native-community/push-notification-ios": "^1.8.0", "@react-native-firebase/analytics": "^11.2.0", "@react-native-firebase/app": "^10.0.0", "@react-native-firebase/messaging": "^10.0.0", @@ -57,6 +58,7 @@ "react-native-photo-manipulator": "^1.2.4", "react-native-picker-select": "^7.0.0", "react-native-pinchable": "^0.2.1", + "react-native-push-notification": "^7.4.0", "react-native-push-notifications": "^3.0.10", "react-native-reanimated": "2.0.0-rc.0", "react-native-safe-area-context": "^3.2.0", diff --git a/src/screens/main/NotificationsScreen.tsx b/src/screens/main/NotificationsScreen.tsx index 84c15f66..b19107a7 100644 --- a/src/screens/main/NotificationsScreen.tsx +++ b/src/screens/main/NotificationsScreen.tsx @@ -29,6 +29,7 @@ import { import {RootState} from '../../store/rootReducer'; import {NotificationType, ScreenType} from '../../types'; import {getDateAge, normalize, SCREEN_HEIGHT, SCREEN_WIDTH} from '../../utils'; +import PushNotificationIOS from '@react-native-community/push-notification-ios'; const NotificationsScreen: React.FC = () => { const {newNotificationReceived} = useSelector( @@ -111,6 +112,7 @@ const NotificationsScreen: React.FC = () => { : moment(previousLastViewed), ); await AsyncStorage.setItem(key, moment().toString()); + PushNotificationIOS.setApplicationIconBadgeNumber(0); }; getAndUpdateLastViewed(); }, [notifications]); @@ -1091,6 +1091,13 @@ resolved "https://registry.yarnpkg.com/@react-native-community/netinfo/-/netinfo-6.0.0.tgz#2a4d7190b508dd0c2293656c9c1aa068f6f60a71" integrity sha512-Z9M8VGcF2IZVOo2x+oUStvpCW/8HjIRi4+iQCu5n+PhC7OqCQX58KYAzdBr///alIfRXiu6oMb+lK+rXQH1FvQ== +"@react-native-community/push-notification-ios@^1.8.0": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@react-native-community/push-notification-ios/-/push-notification-ios-1.8.0.tgz#7d43cb37b9e644ff3069aafa91befe71688a2dc4" + integrity sha512-vxvkeampafjmtDoQBN8Q4azP21l6cMX93+OQZemyIWZmG++OjCVDQVitobf/kWLm5zyGwdylejbpMGo75qo7rA== + dependencies: + invariant "^2.2.4" + "@react-native-firebase/analytics@^11.2.0": version "11.5.0" resolved "https://registry.yarnpkg.com/@react-native-firebase/analytics/-/analytics-11.5.0.tgz#7a4388a264ff7799ab3a257906a4fd965a92660a" @@ -7381,6 +7388,11 @@ react-native-pinchable@^0.2.1: resolved "https://registry.yarnpkg.com/react-native-pinchable/-/react-native-pinchable-0.2.1.tgz#93cf6ce78f65cef2f1364187320e363170d2e212" integrity sha512-LRSLCrizUX/XtYwwBxyuYL4xDLUhyPbBvD/tUpzns0PX2Zs0pR0fd/LsFm/n6tEigCLL/0KlDrOVhOdW3wtz+Q== +react-native-push-notification@^7.4.0: + version "7.4.0" + resolved "https://registry.yarnpkg.com/react-native-push-notification/-/react-native-push-notification-7.4.0.tgz#81192356eddfee8eeaf72a9a696c7c90bf5b0ece" + integrity sha512-Ac3Ep71e2D8Q/Vy0OHBAO5JwhsFsNSuf9knkpXQWS0B9488nIZJLEMuTpF8610xPvGw7XxVrL/q0oZO5F1pOzw== + react-native-push-notifications@^3.0.10: version "3.0.10" resolved "https://registry.yarnpkg.com/react-native-push-notifications/-/react-native-push-notifications-3.0.10.tgz#928f54070a96f12d1980cf074d221675e84faab7" |