Skip to content

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

Open

Description

@Doychev

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

Activity

  1. roycwc commented on Sep 14, 2020

    @roycwc

    #159

    possible name collision with

    NSString *const RCTRemoteNotificationReceived = @"RemoteNotificationReceived";
    

    in

    node_modules/@react-native-community/push-notification-ios/ios/RNCPushNotificationIOS.m
    
  2. rlsbelmiro commented on Dec 7, 2020

    @rlsbelmiro

    Hello, any update about this problem?

  3. prasadmaduranga commented on Dec 17, 2021

    @prasadmaduranga

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions