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.
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.
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 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/Antitrust.app/www/index.html
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.
@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.