From https://issues.apache.org/jira/browse/CB-10530 regarding app freezing at launch.
However I was not sure about why the timer resolves due to long script execution times though. It seems like the intention is that whenever gap://ready is loaded in the iframe, the immediate response from the native side should be to call nativeFetchMessages() which should clear the timeout.
I wrapped the entire method in a dispatch_async call (maybe a very naive solution, it might mess with references?):
This also solves the original issue on cordova-ios 4.0.1 as the timeout never resolves, so maybe asyncing this method should also be a part of the proper fix?