onRegistrationSucceeded not being triggered

I’m trying to implement the push notifications on iOS following the steps in https://github.com/fusetools/handbook-docs/blob/master/FuseJS/05%20-%20Push%20notifications.md

When I only had a developer certificate installed the onRegistrationSucceeded function triggered like expected, (in the beginning). However I couldnt send notifications to the token from the log. After some trying I realized the app is always run in Release mode so I generated the correct production certificate. However now the onRegistrationSucceeded callback in never executed. I did get the token by just adding a NSLog in the AppDelegate.mm, and using that token I can send notifications to my phone. However without the onRegistrationSucceeded callback I can’t send the tokens to my server… I’m using this code:

<FuseJS.Push ux:Global="Push" />
<JavaScript>
var Push = require("Push");

Push.onRegistrationSucceeded = function(regID) {
  console.log ("Reg Succeeded: " + regID); // no logs in debug window
  fetch('http://temperary.unsecure.server.com/api/register/&#39; + regID , {
      method: 'GET'
  }); // no requests in my server's logs
};

Push.onRegistrationFailed = function(reason) {
    console.log ("Reg Failed: " + reason);
};

Push.onReceivedMessage = function(payload) {
    console.log ("Recieved Push Notification: " + payload); // displays log message
};
</JavaScript>

The onReceivedMessage is being triggerd when I click the notification.

As uldis suggested, turn off the notifications on the device, eventually restart the app (I did that but I’m not sure it was needed), then turn the notification back on and restart the app. On the first run I got the ID. Not on subsequent ones, so you probably just get it once in a while, when and if it needs to re-register. Hope this helps others having this issue.