White Sceen of death on Cordova iOS but not browser

  |   By  |  0 Comments

Today I was getting a white screen when trying to simulate my latest Cordova App on iOS using XCode 11.
The debug messages weren’t helpful.

NSURLConnection finished with error - code -1100
2019-11-03 18:41:25.312124+0000 Plumbers Mate[9951:3513187] Finished load of: file:///Users/Andy/Library/Developer/CoreSimulator/Devices/6B89E196-7C29-4879-A5C3-1749D1063D16/data/Containers/Bundle/Application/76725DD0-4577-4BC9-8192-0E6A92394C9D/Plumbers%20Mate.app/www/index.html

I spent ages Googling “NSURLConnection finished with error – code -1100” to discover it was there in other apps and irrelevant.

Then I finally found this article https://geeklearning.io/apache-cordova-and-remote-debugging-on-ios/

So you can use Safari to do the same kind of Inspect Console that Chrome does when using the browser platform.

Open Safari and then click on Sarfari>Prefences>Advanced
Make sure “Show Develop menu in menu bar” is checked…

Debug setup for Safari

There’s some more steps in the article if you want to debug a connected device, but I’m still trying to get my app to work in the Simulator.

Then to debug what’s in the Xcode Simulator, go to Safari>Developer and pick the Simulator..

Then I found my issue immediately!

Found the error!

It turns out it was a case issue in the file name – index.html was calling customerService.js, but the file was CustomerService.js – didn’t matter on the browser platform, but sure does on iOS!



Andy Moyle is a church leader and web developer. His biggest project is the Church Admin WordPress plugin and app. He also runs, mainly so he can eat pizza.