You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using webengage for my react native app push notifications. After following the reference provided in the webengage and react native webengage docs, I am able to get push notifications in my app. i am doing simple push notification integration,with not additional configrurations.
But after clicking on push notification my app is getting crashed and i observered below log in the console.
023-07-11 17:21:02.851991+0530 Bytes[413:28518] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSObject userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:]: unrecognized selector sent to instance 0x280955400'
these are the following changes i had done for integration:
// Appdelegate.mm
#import"AppDelegate.h"
#import<WebEngage/WebEngage.h>
#import<React/RCTBundleURLProvider.h>
#import<Firebase.h>@implementationAppDelegate
- (BOOL)application:(UIApplication *)applicationdidFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.moduleName = @"Bytes";
// You can add your custom initial props in the dictionary below.// They will be passed down to the ViewController used by React Native.
self.initialProps = @{};
[FIRApp configure];
// Enable Firebase Analytics
[FIRAnalytics setAnalyticsCollectionEnabled:YES];
[[WebEngage sharedInstance] application:application didFinishLaunchingWithOptions:launchOptions];
return [superapplication:application didFinishLaunchingWithOptions:launchOptions];;
}
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
#if DEBUG
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
#elsereturn [[NSBundlemainBundle] URLForResource:@"main"withExtension:@"jsbundle"];
#endif
}
/// This method controls whether the `concurrentRoot`feature of React18 is turned on or off.////// @see: https://reactjs.org/blog/2022/03/29/react-v18.html/// @note: This requires to be rendering on Fabric (i.e. on the New Architecture)./// @return: `true` if the `concurrentRoot` feature is enabled. Otherwise, it returns `false`.
- (BOOL)concurrentRootEnabled
{
returntrue;
}
@end
// pod file
target 'Bytes' do
config = use_native_modules!
# Add the WebEngage pod
pod 'react-native-webengage', :path => '../node_modules/react-native-webengage'
I was not sure why is this happened. Is there any additonal configuration i has to do apart from these?
Also is this the way for ios push notificaiton as well to get data from notification data?
Hi,
I am using webengage for my react native app push notifications. After following the reference provided in the webengage and react native webengage docs, I am able to get push notifications in my app. i am doing simple push notification integration,with not additional configrurations.
But after clicking on push notification my app is getting crashed and i observered below log in the console.
these are the following changes i had done for integration:
I was not sure why is this happened. Is there any additonal configuration i has to do apart from these?
Also is this the way for ios push notificaiton as well to get data from notification data?
reference followed:
react native integration: https://docs.webengage.com/docs/react-native, https://github.com/WebEngage/react-native-webengage
webengage installation : https://docs.webengage.com/docs/ios-getting-started
output of react-native info:
System:
OS: macOS 12.6.5
CPU: (4) x64 Intel(R) Core(TM) i5-4278U CPU @ 2.60GHz
Memory: 18.22 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 16.4.0 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 8.6.0 - /usr/local/bin/npm
Watchman: 2022.03.21.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.2 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode: 12.5.1/12E507 - /usr/bin/xcodebuild
Languages:
Java: 13.0.2 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0
react-native: 0.71.7 => 0.71.7
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
TIA
The text was updated successfully, but these errors were encountered: