Ionic View app how to get device token

I would like to get device token on ionic view app, but doesn’t seem I am getting the device token.

$ionicPlatform.ready(function(){
                  var iosConfig = {
                    "badge": true,
                    "sound": true,
                    "alert": true,
                  };
                $cordovaPush.register(iosConfig).then(function(deviceToken) {
                 // device token not logged :frowning:
               }) 
}); 

Does ionic view actually will get deviceToken? if so how?