I’m using the following code:
$ionicPlatform.on('resume', function() {
// do stuff
});
Within
MyApp.run(function(...
My problem is on both the iOS simulator and on my iPhone, this seems very inconsistent. Sometimes it triggers resume and sometimes (actually, mostly) not.
I either a) don’t fully understand when resume
is triggered or how it works or b) am putting it in the wrong place.
To test it I’ve tried clicking the home button and then opening the app again. I’ve also tried opening the app, closing it and opening it again.
Can anyone point me in the right direction?