Hi,
I added my plugins in package.json as described here: http://jbavari.github.io/blog/2014/06/24/managing-cordova-plugins-with-package-dot-json-and-hooks/
"cordovaPlugins": [
{ "locator": "android.support.v4" },
{ "locator": "plugin.http.request" },
{ "locator": "org.apache.cordova.console" },
{ "locator": "org.apache.cordova.geolocation" },
{
"locator": "https://github.com/Wizcorp/phonegap-facebook-plugin",
"variables": {
"APP_ID": "15515151515151",
"APP_NAME": "MyApp"
}
}
]
Notice that variables for the facebook plugin are included. Yet when I run ionic platform add ios, I get this error:
Running command: /Users/jbelis/Sources/applicationtwiing/hooks/before_platform_add/init_directories.js /Users/jbelis/Sources/applicationtwiing
Creating ios project...
Running command: /Users/jbelis/Sources/applicationtwiing/hooks/after_prepare/010_add_platform_class.js /Users/jbelis/Sources/applicationtwiing
add to body class: platform-ios
Running command: /Users/jbelis/Sources/applicationtwiing/hooks/after_prepare/020_remove_sass_from_platforms.js /Users/jbelis/Sources/applicationtwiing
Installing "android.support.v4" for ios
Installing "com.phonegap.plugins.facebookconnect" for ios
Failed to install 'com.phonegap.plugins.facebookconnect':Error: Variable(s) missing: APP_ID, APP_NAME
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:304:23
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:749:13)
at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:557:44
at flush (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:419:13)
Error: Variable(s) missing: APP_ID, APP_NAME
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:304:23
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:749:13)
at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:557:44
at flush (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:419:13)
My hooks folder has a “after_platform_add/010_install_plugins.js” which is supposed to add the plugin and use the variables attribute if present.
This suggests that ionic/cordova is not even using my hooks and trying to add plugins assuming none of them has variables
Any idea why?
Thanks.