App stuck on splash screen in iOS simulator

The app works fine in a browser with ionic serve but gets stuck on the splash screen when opened in the Xcode simulator or an iPhone.

If I use ionic run or ionic emulate from the command line the simulator gets stuck on a black screen.

One difference I noticed that could have caused this was that app.js use to run twice on load but now it only runs once. I am lost on how to debug this, I don’t see any error messages in the Xcode debugger.

Any help would be greatly appreciated. Thanks!

Another good way to see what’s going on is open Safari on your desktop, go to the “Develop” menu, then select the simulator near the top of the dropdown and finally the index file running on the simulator. If you don’t have the develop menu you can turn it on following this guide.

Once the inspector opens go to the javascript console at the bottom and type window.location.reload(). You should see any relevant js/file errors pop up once the window reloads.

2 Likes

You can also use the reload icon on the top of the Safari developer window to see what happens.

1 Like