OK. Here is some additional details about this problem...
The problem is that when you make a jQuery ajax call in iOS, it seems to take forever to return with a 404. The timeout doesn't seem to take as long on Android.
The reason the timeout is the issue is because the ajax call has a success and fail callback, so it takes the length of the timeout to call the fail callback. If your code doesn't progress until either of these callbacks are called then it will appear as if your app has stalled.
I fixed the immediate problem but I still have this issue in other places where I have a loading spinner - so it's not so much of an issue there. However, is there a way to change this timeout value? And should I change it if I can?
I have a Phonegap app running on Android and IOS.
For some reason the initialization on IOS is very slow when WIFI is turned off. However, it acts normally if Airplane mode is turned on (in which case WIFI is off).
It always behaves the same at initialization on Android.
During initialization the app...
- Get's the MACAddress using the phonegap plugin.
- Get's the connection information using the phonegap plugin.
- Does an ajax call using jQuery ajax, it does not wait for the data to return - however.
I've tried debugging the problem but it seems like the app is doing absolutely nothing while it hangs (it takes like a minute+ to initialize as opposed to the usual couple of seconds). There are no error messages or any significant syslog messages. It eventually starts and works normally.
I'm stuck on ideas as to what could be causing this, I know the code works correctly - at least on Android - because I followed it through and I also removed any unused plugins. I was hoping some of you might have some suggestions as to what you think may be the cause.
I'm sorry that I can't share the source because my boss would be upset with me if I did.