Skip to content
This repository has been archived by the owner on Sep 15, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1133 from tarun1793/patch-1
Browse files Browse the repository at this point in the history
Adding push.finish() method - required in iOS
  • Loading branch information
gortok committed Jan 16, 2016
2 parents ce58c66 + e9a40b7 commit c449756
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/plugins/push_v5.js
Expand Up @@ -62,6 +62,19 @@ angular.module('ngCordova.plugins.push_v5', [])
}, number);
}
return q.promise;
},
finish: function(){
var q = $q.defer();
if (push === undefined) {
q.reject(new Error('init must be called before any other operation'));
} else {
push.finish(function (success) {
q.resolve(success);
}, function (error) {
q.reject(error);
});
}
return q.promise;
}
};
}]);

0 comments on commit c449756

Please sign in to comment.