Ionic iOS build does not work anymore (white screen of death)

Hi there,

I don’t know what’s happened and it’s driving me nuts.

First of all, some info about my setup:

Cordova CLI: 6.1.1
Gulp version:  CLI version 3.9.0
Gulp local:   Local version 3.9.0
Ionic Version: 1.2.4
Ionic CLI Version: 1.7.14
Ionic App Lib Version: 0.7.0
ios-deploy version: 1.8.5 
ios-sim version: 5.0.8 
OS: Mac OS X El Capitan
Node Version: v4.4.2
Xcode version: Xcode 7.3 Build version 7D175

Cordova Plugins:

cordova-plugin-console 1.0.2 "Console"
cordova-plugin-device 1.1.1 "Device"
cordova-plugin-file 4.1.1 "File"
cordova-plugin-file-transfer 1.5.0 "File Transfer"
cordova-plugin-statusbar 2.1.2 "StatusBar"
cordova-plugin-whitelist 1.2.1 "Whitelist"
ionic-plugin-keyboard 2.0.1 "Keyboard"

ionic serve works perfectly but when I try to run the iOS version, it doesn’t work. I am in the process of building an app (about 90% done) for a client and from one day to another, the new iOS app build don’t work. I don’t know what changed the whole thing (maybe updating to the new xcode version)?

ionic build ios works without an error.

ionic emulate ios produces one of the following scenarios:

  • The app works (very rarely)
  • The app shows a never ending splash screen
  • The app shows the splash screen for a second and then changes to blank screen

The latter is the problem I am facing the most. I tried pretty much everything:

  • Reinstalled Xcode (including removing all the cache stuff)
  • Reinstalled node, cordova, ionic
  • Removed cordova plugins and added them again, I also tried running the app with only a couple of the plugins installed (sometimes it works after runnning ionic build ios && ionic emulate ios -lcs, but if I quit the app and start it again, the white screen of death is back again)
  • sudo chown -R USERNAME /Users/USERNAME
  • And of course always used ionic state reset or remove platform, add platform.
  • Cleared pretty much the entire code in ionic.Platform.ready

The best chance to get the app running is to just use ionic emulate ios without any command line flags (-lcs).

If I use one of the flags, there is no console output. Furthermore, there is no console.log file, just the white screen.

It’s driving me nuts and I am working on this problem for days.

Any help is MUCH APPRECIATED! :sweat:


Do you use any versionning in your project, and can you revert to an older state of your app to see if it’s getting better ?
Maybe you changed some of your code in the app.js or in your first controller, which prevents the app from loading correctly.
There were a cordova upgdrade recently too, maybe try to install cordova 6.0.1.
You have no splascreen plugin installed, is this a normal thing ?

Nope (I know, shame on me). But I haven’t changed anything drastically in the last couple of days. And as I said no problems with ionic serve.

I also did a fresh project and copied the www folder manually. No change.

Oh, I probably forgot to install it again after cycling through the list of plugins (removing/adding).

I investigated the whole thing a bit more and I found out, that there is connection with using the --livereload / -l flag. The chances are way higher for the app to start if I omit that flag.

Well, this is very strange! Now it seems to work with
ionic emulate ios -lcs --address localhost.
At least the emulator does work.

I did test it yesterday and it didn’t work… very strange.

I will update this thread with further information soon.

When I build the app and try to run it on the device with Xcode, there is the never ending splash screen :(.

Xcode Console shows:

2016-04-04 18:00:38.394 atally[2828:974006] Apache Cordova native platform version 4.1.0 is starting.
2016-04-04 18:00:38.395 atally[2828:974006] Multi-tasking -> Device: YES, App: YES
2016-04-04 18:00:38.424 atally[2828:974006] Using UIWebView
2016-04-04 18:00:38.425 atally[2828:974006] [CDVTimer][handleopenurl] 0.057995ms
2016-04-04 18:00:38.426 atally[2828:974006] [CDVTimer][intentandnavigationfilter] 1.190007ms
2016-04-04 18:00:38.426 atally[2828:974006] [CDVTimer][gesturehandler] 0.046015ms
2016-04-04 18:00:38.439 atally[2828:974006] [CDVTimer][file] 13.509989ms
2016-04-04 18:00:38.453 atally[2828:974006] [CDVTimer][splashscreen] 12.953997ms
2016-04-04 18:00:38.460 atally[2828:974006] [CDVTimer][statusbar] 7.657051ms
2016-04-04 18:00:38.461 atally[2828:974006] [CDVTimer][keyboard] 0.075996ms
2016-04-04 18:00:38.461 atally[2828:974006] [CDVTimer][TotalPluginStartup] 36.181986ms
2016-04-04 18:00:38.612 atally[2828:974006] Resetting plugins due to page load.
2016-04-04 18:00:38.648 atally[2828:974006] Failed to load webpage with error: Could not connect to the server.

I did ionic prepare ios && ionic build ios and now it does work on the device over Xcode. It’s a hit and miss actually.

For everyone who has the same problems: don’t give up. Ionic + Cordova + XCode don’t seem to be friends actually ;).

I’m having the same problem (it seems deviceready is not firing), have tried the same steps:
Reinstall Cordova, Ionic, Node,
Add/remove all plugins (including with the recent pluginset update),
check out from scratch.

The code is here if anyone wants to give it a shot:

I found the problem was related to the WKWebView plugin and missing settings in config.xml.

Make sure you have the following in config.xml if you are using WKWebView!

<feature name="CDVWKWebViewEngine">
    <param name="ios-package" value="CDVWKWebViewEngine" />

<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
1 Like

I have the exact same problem but did not find a fix to date.
When I test on a real device, I get a few “Receive memory warning” and then the app quit (I think it’s killed by the OS).

Here’s the full Xcode log :

2016-09-27 18:43:06.602 Antitrust[18056:4648205] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///private/var/mobile/Containers/Data/Application/9AF4C010-0414-485E-9166-9D047CF3EC93/Library/Cookies/Cookies.binarycookies
2016-09-27 18:43:06.768 Antitrust[18056:4648205] Apache Cordova native platform version 4.0.1 is starting.
2016-09-27 18:43:06.770 Antitrust[18056:4648205] Multi-tasking -> Device: YES, App: YES
2016-09-27 18:43:07.541 Antitrust[18056:4648205] Using UIWebView
2016-09-27 18:43:07.552 Antitrust[18056:4648205] [CDVTimer][handleopenurl] 0.353992ms
2016-09-27 18:43:07.566 Antitrust[18056:4648205] [CDVTimer][intentandnavigationfilter] 13.997018ms
2016-09-27 18:43:07.567 Antitrust[18056:4648205] [CDVTimer][gesturehandler] 0.634015ms
2016-09-27 18:43:07.655 Antitrust[18056:4648205] [CDVTimer][splashscreen] 87.392986ms
2016-09-27 18:43:07.681 Antitrust[18056:4648205] [CDVTimer][statusbar] 25.397956ms
2016-09-27 18:43:07.684 Antitrust[18056:4648205] [CDVTimer][keyboard] 2.380013ms
2016-09-27 18:43:07.685 Antitrust[18056:4648205] [CDVTimer][TotalPluginStartup] 133.725047ms
2016-09-27 18:43:09.273 Antitrust[18056:4648205] Resetting plugins due to page load.
2016-09-27 18:43:13.137 Antitrust[18056:4648205] Finished load of: file:///var/containers/Bundle/Application/5BD832D6-C56A-4A96-AAE4-4D3ED4874C6C/
2016-09-27 18:43:17.469 Antitrust[18056:4648205] THREAD WARNING: ['Device'] took '19.695068' ms. Plugin should use a background thread.
2016-09-27 18:43:51.798 Antitrust[18056:4648205] Received memory warning.
2016-09-27 18:43:57.570 Antitrust[18056:4648205] Received memory warning.
2016-09-27 18:44:11.928 Antitrust[18056:4648205] Received memory warning.
2016-09-27 18:44:17.095 Antitrust[18056:4648205] Received memory warning.

Any help would be much appreciated.


@Jul, just for the record, I had the WSOD problem when I migrated from UIWebView to WKWebView. I could only resolve it executing these instructions step-by-step.


Thanks for your answer.

The problem seems to be gone with the latest version.

Thanks, it worked to me!

When i return on webview after I playing a video with cordova jwplayer plugin, I have the blank white screen, but the html is there but not displayed.