Skip to content

[PushNotificationIOS] No register event ever gets triggered #1613

@timminkov

Description

@timminkov

I'm trying to get push notifications working on my device:

Pulling this commit on React 0.5.0.

Adding a PushNotificationIOS.requestPermissions() in my render pops open the permissions box, but when I add:

PushNotificationIOS.addEventListener('register', function(data) {
  console.log(data);
});

I get nothing logged. I've tried in the simulator and on an actual device but once I click the allow button, nothing. I've tried using this component too.

I also tried adding the following code to my AppDelegate.m from this thread:

- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
  [RCTPushNotificationManager application:application didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
}

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions