Push Notification ecb callback stops firing after app is restarted

iOS ecb callbacks stop firing after a few days. When the app is first installed they work great, but eventually stop firing when the app is closed and opened again. I show a popup with the notification’s message when user clicks the notification. Maybe the problem is because I register the device from inside of a controller that eventually is out of scope??? Maybe, but the ecb is scoped to the window object like so:

.run(function ($ionicPlatform, $cordovaVibration, $cordovaDialogs) {
    $ionicPlatform.ready(function () {
        window.onNotificationAPN = function (event) {
            $cordovaDialogs.alert(event.alert);
        }
    });
})

And here in a controller I register the device and tell APNS ecb is

window.onNotificationAPN:
window.errorHandler = function (error) {
                alert(error);
            };

            tokenHandler = function (result) {
                alert('device token: ' + result)
            };
            
pushNotification.register(
                          tokenHandler,
                          window.errorHandler, {
                              "badge": "true",
                              "sound": "true",
                              "alert": "true",
                              "ecb": "window.onNotificationAPN"
                          });

I’m stumped, any ideas?

Hi DavePadot, you solve this?.. I have the same thing here. The onNotificationAPN is out of $scope and its a problem for save the register id on my server side.

Best
C