{"action":"closed","issue":{"url":"https://api.github.com/repos/zo0r/react-native-push-notification/issues/206","repository_url":"https://api.github.com/repos/zo0r/react-native-push-notification","labels_url":"https://api.github.com/repos/zo0r/react-native-push-notification/issues/206/labels{/name}","comments_url":"https://api.github.com/repos/zo0r/react-native-push-notification/issues/206/comments","events_url":"https://api.github.com/repos/zo0r/react-native-push-notification/issues/206/events","html_url":"https://github.com/zo0r/react-native-push-notification/issues/206","id":178110065,"number":206,"title":"onRegister callback is never called, both on Android and iOS","user":{"login":"alexishuard","id":4367649,"avatar_url":"https://avatars.githubusercontent.com/u/4367649?v=3","gravatar_id":"","url":"https://api.github.com/users/alexishuard","html_url":"https://github.com/alexishuard","followers_url":"https://api.github.com/users/alexishuard/followers","following_url":"https://api.github.com/users/alexishuard/following{/other_user}","gists_url":"https://api.github.com/users/alexishuard/gists{/gist_id}","starred_url":"https://api.github.com/users/alexishuard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexishuard/subscriptions","organizations_url":"https://api.github.com/users/alexishuard/orgs","repos_url":"https://api.github.com/users/alexishuard/repos","events_url":"https://api.github.com/users/alexishuard/events{/privacy}","received_events_url":"https://api.github.com/users/alexishuard/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-09-20T16:29:34Z","updated_at":"2016-10-06T19:34:46Z","closed_at":"2016-10-06T19:34:46Z","body":"Hey there,\r\n\r\nIt seems like the onRegister callback is never activated. I've tried on both iOS and Android platform.\r\nI have managed to receive a prompt asking for Notifications permissions.\r\n\r\nI also followed the stack trace all the way through callNative, which is triggered with a function named \"register\" and the appropriate callback  ( _onRegister ) , it is never fired.\r\n\r\nThis is how I configure my PushNotification :\r\n```\r\ncomponentDidMount() {\r\n    PushNotification.configure({\r\n      // (optional) Called when Token is generated (iOS and Android)\r\n      onRegister: (token) => {\r\n        // ...\r\n      },\r\n      onNotification: (notification) => {\r\n        // ...\r\n      },\r\n      senderID: \"< A SENDER ID >\",\r\n      popInitialNotification: true,\r\n      requestPermissions: true\r\n    });\r\n  }\r\n```\r\n\r\nI've truncated the code in both onRegister and onNotification, but it triggers a fetch call to a remote  API. I've switched the logic to a simple `console.error(token)` and nothing.\r\n\r\nAlso, the remote debugger never stops if I put a `debugger;` at the beginning of `onRegister`\r\n\r\nI am working with the latest version of this package as well as react-native 0.34-rc.0 on iOS 10 and Android 6.0.0\r\n\r\nFinally, I did test push notifications for both platforms on PushWatch and it does work."}}
{"actor":{"display_login":"alexishuard"}}