My mobile app is built using angular.js, Twitter Bootstrap, and grunt with a .NET back end. After logging in, the loading spinner keeps showing up constantly in the top nav next to the time and battery status. We make server calls at login through a factory using a timeout and promise.
login: function (credentials) {
var that = this;
return login(credentials)
.then(function() {
$timeout(function() {
that.getFamily().then(function (family) {
$cookies.familyId = family.id.toString();
Cart.getCart();
});
}, 100);
});
}
var login = function (credentials) {
return $http.post('/family/login', credentials);
};
We are not employing long polling, so none of the solutions I've found for that issue have been helpful. The problem only occurs on mobile safari on iOS. It does not happen on Chrome, Firefox, etc., in-browser or on other mobile devices. I have tried setting a datetime stamp on the POST request as well as removing various Apple meta tags, but nothing has worked. Based on my research, there seem to be issues with iOS6+ caching posts, which could be causing the never-ending spinner. Some sources suggest it's an iOS bug, so the exact cause is uncertain.
Please provide assistance!