This was my first message - see the second one for more details!
Since I have updated to RC.1 AND installed the newest Xcode-Version (because of IOS 10) the startup time of my project increased from about 2 secs to nearly 20 secs.
I have no idea whats going on - the debugger doesn’t show any message in the delay. Seems as if the app is waiting for something for ages…
I have fou d out the possible reason but don’t yet know how to solve it.
The delay is caused because I have set my splashscreen to show 20 secs or until it is disabled.
It is normally disabled when the platform_ready event fires - and thats the problem.
Looking in the debug window of xcode I found
CallyApp[823:195274] WARN: Native: deviceready did not fire within 2000ms. This can happen when plugins are in an inconsistent state. Try removing plugins from plugins/ and reinstalling them.
2016-10-17 20:55:37.204047 CallyApp[823:195274] deviceready has not fired after 5 seconds.
2016-10-17 20:55:37.204067 CallyApp[823:195274] Channel not fired: onCordovaInfoReady
2016-10-17 20:55:37.204088 CallyApp[823:195274] DEVICE READY FIRED AFTER 54542 ms
2016-10-17 20:55:37.213071 CallyApp[823:195274] app.ts: hiding the splashscreen
I found out two more things: the output above did show only after I entered the first textbox / when the keyboard was shown. So it might be a problem with the keyboard plugin?
Then I found that storing in the normal KV-List doen’ t work anymore, so its probably the sql-lite plugin???
Anyway: I removed all plugins and I added them all again - it didn’t help
The error appears only with IOS not when I run ionic serve.
Althought it seemed to be a problem of plugins it was not!
This behaviour appears if you have iOS10 on the smartphone AND you have configured a Content Security Policy (CSP) in index.html (as can be found in the book of Josh Morony). This CSP was originally need back in beta11 and earlier, but with RC.0 it is not. However in iOS<9 it doesn’t make any problem, only in ios10.
If you have this problem and have read Josh Moronys book or blog, delete the content security policy meta tag in index.html.
had a similar problem on android.
when building the final release version, i had to add -prod to the build command: ionic build --release android -prod
this decreased the time to home screen with more than half!
Definitely seems to be some kind of issue with CSP (not sure whether that’s an iOS10 bug or not), it looks like people are having success with this CSP though:
Yes, thats what I did and it seems to work for me, but can’t guarantee, that this will work in your app. The content security policy must be good for something and I must say, I never understood completely what it does, because I thought the white-list-plug-in does the same.
In my app I use http to access a REST-service from a server, but I do not load any content into the page over http (all content is local). Perhaps that’s the reason, why I don’t need the CSP. @joshmorony: Could you give us a hint, why and when exactly a CSP is needed?
I would like to add, that I followed Josh’s suggestion and added the new Content-Security-Policy - in hoping that this will work everywhere. It definitely works on iOS 10 and Android/Crosswalk.
I have submitted my app to the google play store and the apple app store and so far I had no complaints. So I guess, it wirks everywhere (or I was just lucky so far)