i have an ionic 2 app, both android and IOS.
migrated from Ionic 1. both platforms worked without problems.
it uses the chrome.sockets plugins…
I had to add (’<‘any’>’ text`window). in front of the calls. chrome sockets…
on android this works fine. I spent a while discovering that in addition to the cordova plugin add,
I also need to npm i the plugins…
on ios the plugins appear not to be loading…
console.log(“chrome=”+JSON.stringify((’<‘any’>'window).chrome));
produces
[10:53:59] console.log: chrome=undefined
and the exception handler for
(’<‘any’>'window).chrome.sockets.tcpServer.listen(createInfo.socketId,ip, 0,1, …
produces
[10:53:59] console.log: sockets failure=TypeError: undefined is not an object (evaluating ‘window.chrome.sockets’)
i have uninstalled the plugins, done the npmi for the plugins, done the cordova add for the plugins
checked the config files and package.json… added the missing plugin file definitions…
still no change…
the source is a tar/untar of the src folder from the android system on ubuntu to my mac
same project name, etc… i rebuilt the project from scratch on ios then copied the src folder)
any pointers welcomed
the ‘<‘any’>’ is without the quotes, else it wouldn’t show up here