I’ve just attempted new fresh installs of everything on a 10.10 mac with xcode 6.1. I have Ionic 1.2.8 installed via npm and cordova 4.
I went to the ngCordova site, downloaded the example/demo zip file and built it. It built just fine with a new project, and I ran it on my iPhone 6 just fine, except not a single one of the plugins worked. Has anyone else done this with more success?
I also had safari’s web inspector opened up to watch the javascript errors as well, and I don’t see too many - or in particular there’s nothing to suggest major problems with the code.
I’m using the demo code that they apparently packaged (link here), it’s supposed to be a demo of all the ngCordova plugins working, so I was counting on it actually working…
I did check though to just make sure and everything looks fine…here’s the entire head:
Any of the devs want to answer this? I’m still having zero luck, these are the errors when the app loads:
[Error] TypeError: null is not an object (evaluating 'document.getElementById('fb-root').appendChild')
(anonymous function) (facebookConnectPlugin.js, line 180)
global code (facebookConnectPlugin.js, line 182)
[Error] Failed to load resource: The requested URL was not found on this server. (sdk.js, line 0)
[Error] TypeError: undefined is not an object (evaluating 'window.cordova.plugins.Keyboard')
(anonymous function) (app.js, line 43)
(anonymous function) (ionic.bundle.js, line 37061)
onPlatformReady (ionic.bundle.js, line 2246)
subscribe (cordova.js, line 699)
addEventListener (cordova.js, line 126)
onWindowLoad (ionic.bundle.js, line 2230)
All of them that are included in the demo…you can see the paste above has all the plugins included. I got these files from this site: http://ngcordova.com/docs, I downloaded the zip file which included the ngCordova demo. I built it using Ionic 1.1.12, cordova 4.1.2, and am running it on my iphone 6 which has 8.1.2 on it.
All ngCordova does is just wrap the cordova javascript in a more angular-friednly syntax. You’ll still need to add the appropriate plugins which are mentioned in the docs
Well then! This is interesting, I got a few working this way - contacts still doesn’t seem to do anything. No errors though, do you know what the contacts demo is supposed to do? I type in a name or something and hit add contact and nothing happens. Does cordova allow for contacts to be used in-app, for adding friends via phone contacts and the like?