I deviceready doesn't fire or fires very late in my ionic app when I run it on my iOS device with
ionic run ios --device -lcs
I removed all the plugins with ionic plugin rm ...
, deleted the content of the plugins/
directory and reinstalled them.
I also removed and reinstalled the ios platform with ionic platform rm/add ios
.
I am stuck with this.
The iPhone (6+) is on iOS 10.
I am using ionic 1, and the last ionic CLI.
EDIT: I removed all plugins one by one, and its seems that the problem is due to cordova-plugin-network-information and cordova-plugin-device.
Process 663 detached
(lldb)
(node:26790) DeprecationWarning: Using Buffer without `new` will soon stop working. Use `new Buffer()`, or preferably `Buffer.from()`, `Buffer.allocUnsafe()` or `Buffer.alloc()` instead.
14 030280 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.
15 030605 info [object Object]
16 033286 log deviceready has not fired after 5 seconds.
17 033290 log Channel not fired: onCordovaInfoReady
18 033293 log Channel not fired: onCordovaConnectionReady
19 363977 log DEVICE READY FIRED AFTER, 32259, ms
My run.js, AppCtrl.js and the controller of my main view are encapsultaed in $ionicPlatform.ready(function () {..});`
My content security policy is:
<meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; script-src 'self' 'unsafe-inline' 'unsafe-eval' *; connect-src 'self' 'unsafe-inline' 'unsafe-eval' blob: ws: *;">