Alena,
It's shared with you guys. "SID Digest..." is the name.
The steps listed in my above post were performed on both an iPhone 5 (v6) and an iPad Air (v7) after installing the IPA.
Alena,
It's shared with you guys. "SID Digest..." is the name.
The steps listed in my above post were performed on both an iPhone 5 (v6) and an iPad Air (v7) after installing the IPA.
Hello!
I have just tested your app on iPad (iOS 7.1) and it seems to be working as expected.
When there is connection - "Incorrect user name and/or password" alert appears
When there is no connection - "Your device has no connectivity" alert appears
Please note, you have edited Source files in iOS folder. To test your app I had to download project backup, restore it and delete edited files (because my bundle id was not applied).
So please try to delete edited files on Source tab and undo all source changes.
Maryna,
Did you test it with the steps I provided?
If I disable my connection THEN run the app, I correctly get the "no connection" alert when I attempt to login.
If I CLOSE the app, THEN re-enable the connection, and THEN run the app again, I still get the "no connection" alert upon a login attempt and am unable to login at all--regardless of entering the correct credentials or not.
Got it! I'll update!
Hi Mike,
The issue is in your app logic. Online event doesn't fire when you run app (if online), it fires only if app is running in background. That is why when you follow these steps Online event doesn't fire and a localStorae variable isn't cleared.
Let's try checking connection.type on Device ready event:
http://docs.phonegap.com/en/3.3.0/cor...
Then clear your localStorage variable "offline" if there is an Internet connection when you run the app.
Thanks Katya. I've added the following on Device Ready:
function checkConnection() {
var networkState = navigator.connection.type;
Code: Select all
var states = {};
states[Connection.UNKNOWN] = 'Unknown connection';
states[Connection.ETHERNET] = 'Ethernet connection';
states[Connection.WIFI] = 'WiFi connection';
states[Connection.CELL_2G] = 'Cell 2G connection';
states[Connection.CELL_3G] = 'Cell 3G connection';
states[Connection.CELL_4G] = 'Cell 4G connection';
states[Connection.CELL] = 'Cell generic connection';
states[Connection.NONE] = 'No network connection'; }
But I'm not clear on exactly how to have it clear the "offline" variable if it detects a connection...
Hi Mike,
On device ready event add this code:
pre
if (navigator.connection.type !== Connection.NONE) {
localStorage.removeItem("offline");
} else {
localStorage.setItem("offline", "true");
}
/pre
Alena,
Am I adding this by itself or in addition to the function checkConnection?
Also, I need to clear the "offline" variable if the device HAS a connection. Won't your code clear it if there's no connection?
I've added the following on Device Ready and it works now:
if (navigator.connection.type !== Connection.UNKNOWN) {
localStorage.removeItem("offline");
}
if (navigator.connection.type !== Connection.ETHERNET) {
localStorage.removeItem("offline");
}
if (navigator.connection.type !== Connection.WIFI) {
localStorage.removeItem("offline");
}
if (navigator.connection.type !== Connection.CELL_2G) {
localStorage.removeItem("offline");
}
if (navigator.connection.type !== Connection.CELL_3G) {
localStorage.removeItem("offline");
}
if (navigator.connection.type !== Connection.CELL_4G) {
localStorage.removeItem("offline");
}
if (navigator.connection.type !== Connection.CELL) {
localStorage.removeItem("offline");
}
Thanks
Mike,
Thank you for the update. Do not hesitate to contact us if you need any further help.