@angelorigo wrote:
Hi
I am looking for a way to show the user an Ionic popup if there is a new version of an Ionic app.I will use http.post inside app.js .run section and trigger an ionic poup if there is a new version .
What i am confuse about, is how can i read a file that indicate a new version, can config.xml file provide this information ? into version atribute or id atribute of the widget xml markup ?
//Verify new version and trigger a warning $http.post("http://www.somedomain.com/verifyVersion.php") .success( function(data) { console.log(' success data '+data); actualAppversion = somewhere(); //TODO: define a service that retrieve the actual version $scope.appVersionActual = actualAppversion; $scope.appNewVersion = data; if($scope.appNewVersion!= $scope.appVersionActual){ $ionicPopup.confirm({title: "You have an old version",content: "A new version is available."}) } }) .error(function(error){ console.log('Had an error'+error); })
Posts: 6
Participants: 2