code: function (number) {
          var q = $q.defer();
          $window.plugins.pushNotification.setApplicationIconBadgeNumber(function (result) {
            q.resolve(result);
          }, function (error) {
            q.reject(error);
          }, number);
          return q.promise;
        }
docs: iOS only