but my app is stuck on the splash screen, with the loading animation in the middle.
There are no errors on the terminal.
I have Xcode 7.1. And the simulator seems to automatically launch iOS 9 (BTW I am wondering how to choose another version of iOS…).
Can you help me get one step further on the process of debugging my app for iOS ?
I’m still pretty new at Ionic but from my experience so far I would say there is an error in your code which is stopping it from proceeding past the splash screen.
First of all I’d test it in Safari using ionic serve to ensure there’s no errors there.
You can then use developer tools in Safari to debug the error within the Simulator. Sometimes this doesn’t work though if the error occurs before Safari detects the app in Simulator. If that’s the case the only way I’ve been able to fix it is strip back some of the code to iron our what code is causing the error.
Indeed, I developed the whole app using ionic serve on m linux machine, but now I am working on a mac to debug the app on iOS, and I didn’t even try it…
I just did now, and it opens chrome and there are no error, except some 404 for files, which are normal in my app.
I don’t really know how to use Safari to debug: I see, in the ‘Development’ menu of Safari, that there is a ‘simulator’ menu, but there’s no devices in it.
If you run app using xcode and your iphone is connected to your computer using a cable, then you can inspect it using safari Develop -> inspect -> iphone. But Generally you don’t need to do it, XCode would print any JS error in it’s window also
EDIT the default ionic app, is running in the simulator, if I remove the options -lcs.
In the case of my app, if I remove -lcs, I can reach the point where ionic requires angular.min.js.map (which I can now see in Safari’s console). So I am copying it in www/lib/ionic. Then I launch it again and get a white screen in the emulator and no errors in safari Web Inspector console.
Argggh!!
This one’s getting as bit beyond me. All I can suggest is commenting out code so the app loads something (not blank white) and then uncomment it until it breaks again so you can identify which line isn’t working. Not a great solution but it worked for me when I had a similar problem.
Ok i see, what I meant when mentioning livereload is that without this feature it’s going to be really painful to do this step by step procedure. But I can try.
I experienced this issue too, since ionic added cordova splash screen plugin, all we need is to enable the following code in app.js inside .run() function for iOS ONLY.
Hi Louis, you may need the second bit of codes. In my case I thought if I had the last line on the config, it would hide the splasmscreen after 3000 ms. But it doesn’t, you have to tell it to hide in a set time period or u have to wait until the platform is ready.
Thanks for your answer @KimB, it’s weird because on a iOS 9 device, everything works fine, but in the iOS 9 simulator the app is stuck on the splashscreen…
I am gonna try to add the bit of code with navigator.splashscreen.hide();.
Hi Louis, that’s strange. I tested it on iPhone 4, it didn’t work. For two days, it stucked on the splashscreen, so I thought it was something else. That’s interesting, hope someone can explain this behaviour eh.
I have tried the GapDebug, but it did not show my App. And even my app shows, the network panel logs nothing when the app is stuck on splash screen. Can you please tell us how do you debug in the GapDebug?