From 7968b91aa78d2a15eb4e9ba029e9264fc6bfa9c4 Mon Sep 17 00:00:00 2001 From: Mykhailo Mohyliuk Date: Thu, 7 Sep 2023 14:13:22 +0300 Subject: [PATCH] fixed ios push notifications --- client-reactnative/ios/Podfile.lock | 4 ++-- client-reactnative/ios/ethora/AppDelegate.mm | 6 ++++-- client-reactnative/ios/ethora/Info.plist | 1 + client-reactnative/package.json | 2 +- client-reactnative/yarn.lock | 8 ++++---- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/client-reactnative/ios/Podfile.lock b/client-reactnative/ios/Podfile.lock index ae52f8078..3aa292739 100644 --- a/client-reactnative/ios/Podfile.lock +++ b/client-reactnative/ios/Podfile.lock @@ -554,7 +554,7 @@ PODS: - React-Core - RNCClipboard (1.11.1): - React-Core - - RNCPushNotificationIOS (1.10.1): + - RNCPushNotificationIOS (1.11.0): - React-Core - RNDeviceInfo (10.4.0): - React-Core @@ -1007,7 +1007,7 @@ SPEC CHECKSUMS: RNCAsyncStorage: 8616bd5a58af409453ea4e1b246521bb76578d60 RNCCheckbox: 38989bbd3d7d536adf24ba26c6b3e6cefe0bea6f RNCClipboard: 2834e1c4af68697089cdd455ee4a4cdd198fa7dd - RNCPushNotificationIOS: 87b8d16d3ede4532745e05b03c42cff33a36cc45 + RNCPushNotificationIOS: 64218f3c776c03d7408284a819b2abfda1834bc8 RNDeviceInfo: 749f2e049dcd79e2e44f134f66b73a06951b5066 RNFastImage: 5c9c9fed9c076e521b3f509fe79e790418a544e8 RNFBAnalytics: ea1421b49a0bf5e5bb7274df4a330713d0e85d2e diff --git a/client-reactnative/ios/ethora/AppDelegate.mm b/client-reactnative/ios/ethora/AppDelegate.mm index f6f22ab7b..d29f00c5d 100644 --- a/client-reactnative/ios/ethora/AppDelegate.mm +++ b/client-reactnative/ios/ethora/AppDelegate.mm @@ -120,6 +120,10 @@ - (Class)getModuleClassFromName:(const char *)name return RCTAppSetupDefaultModuleFromClass(moduleClass); } + + +#endif + // Required for the register event. - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { @@ -150,8 +154,6 @@ -(void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNoti completionHandler(UNNotificationPresentationOptionSound | UNNotificationPresentationOptionAlert | UNNotificationPresentationOptionBadge); } -#endif - - (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity restorationHandler:(nonnull void (^)(NSArray> * _Nullable))restorationHandler { diff --git a/client-reactnative/ios/ethora/Info.plist b/client-reactnative/ios/ethora/Info.plist index 91ffa805e..a025e7057 100644 --- a/client-reactnative/ios/ethora/Info.plist +++ b/client-reactnative/ios/ethora/Info.plist @@ -127,6 +127,7 @@ UIBackgroundModes + fetch remote-notification UILaunchStoryboardName diff --git a/client-reactnative/package.json b/client-reactnative/package.json index 7b31cde72..dd43b329b 100644 --- a/client-reactnative/package.json +++ b/client-reactnative/package.json @@ -21,7 +21,7 @@ "@react-native-community/audio-toolkit": "^2.0.3", "@react-native-community/checkbox": "^0.5.12", "@react-native-community/netinfo": "^8.3.0", - "@react-native-community/push-notification-ios": "^1.10.1", + "@react-native-community/push-notification-ios": "^1.11.0", "@react-native-firebase/analytics": "^14.9.1", "@react-native-firebase/app": "^14.9.1", "@react-native-firebase/auth": "^14.9.1", diff --git a/client-reactnative/yarn.lock b/client-reactnative/yarn.lock index 4f53807c8..31fa6d1b1 100644 --- a/client-reactnative/yarn.lock +++ b/client-reactnative/yarn.lock @@ -2351,10 +2351,10 @@ resolved "https://registry.npmjs.org/@react-native-community/netinfo/-/netinfo-8.3.1.tgz" integrity sha512-CYZXW3wZJ8Ac7FQjrDfqITFZ6Ex+dCOOKQv0LvjQUI811otSBATyEZrBVWc+1GpZExbKTlulyE0X3W4v5YN1hQ== -"@react-native-community/push-notification-ios@^1.10.1": - version "1.10.1" - resolved "https://registry.npmjs.org/@react-native-community/push-notification-ios/-/push-notification-ios-1.10.1.tgz" - integrity sha512-k6bZWUKLif4GjenyTD3aQLwA2VT3bNmt22INO/34lexnpmqkPDZF7nreqbckTHG0Zso9wDTe4N/AZJUC/d8iRg== +"@react-native-community/push-notification-ios@^1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@react-native-community/push-notification-ios/-/push-notification-ios-1.11.0.tgz#d8ec4acfb52260cb779ed0379b9e197db7841b83" + integrity sha512-nfkUs8P2FeydOCR4r7BNmtGxAxI22YuGP6RmqWt6c8EEMUpqvIhNKWkRSFF3pHjkgJk2tpRb9wQhbezsqTyBvA== dependencies: invariant "^2.2.4"