Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for: remoteNotificationReceived is not a supported event type for RCTAzureNotificationHubManager #166

Open
Doychev opened this issue Jul 22, 2020 · 3 comments

Comments

@Doychev
Copy link

Doychev commented Jul 22, 2020

I have found a little bug, not 100% sure if it's a configuration problem or a general iOS issue. I believe it's a single letter typo - remoteNotificationReceived is expected to have a capital R in front.

TL;DR - in node_modules/react-native-azurenotificationhub/ios/AzureNotificationHubIOS.js:25 -
change remoteNotificationReceived to RemoteNotificationReceived

--

Environment

  • Platforms: iOS

Issues and Steps to Reproduce

When executing:
NotificationHub.addEventListener('notification', this._onRemoteNotification);
the app crashes.

Expected Behavior

Register for notifications.

Actual Behavior

remoteNotificationReceived is not a supported event type for RCTAzureNotificationHubManager. Supported events are: localNotificationReceived, RemoteNotificationReceived, remoteNotificationRegistered, remoteNotificationRegisteredError, azureNotificationHubRegistered, azureNotificationHubRegisteredError

-[RCTEventEmitter addListener:]
RCTEventEmitter.m:78
invoking_
-[NSInvocation invoke]
-[NSInvocation invokeWithTarget:]
-[RCTModuleMethod invokeWithBridge:module:arguments:]
facebook::react::invokeInner(RCTBridge*, RCTModuleData*, unsigned int, folly::dynamic const&)
facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int)::$_0::operator()() const
invocation function for block in facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int)
_dispatch_call_block_and_release
_dispatch_client_callout
_dispatch_main_queue_callback_4CF
CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE
__CFRunLoopRun
CFRunLoopRunSpecific
GSEventRunModal
UIApplicationMain
main
start
0x0

Screenshot_1

@roycwc
Copy link

roycwc commented Sep 14, 2020

#159

possible name collision with

NSString *const RCTRemoteNotificationReceived = @"RemoteNotificationReceived";

in

node_modules/@react-native-community/push-notification-ios/ios/RNCPushNotificationIOS.m

@rlsbelmiro
Copy link

Hello, any update about this problem?

@prasadmaduranga
Copy link

Got the same issue here. Any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants