I'm trying to install PushWoosh, but I don't understand the first instruction here:
https://www.pushwoosh.com/programming-push-notification/ios/ios-additional-platforms/push-notification-sdk-integration-for-phonegap/
Install the Plugin source code for Phonegap push notifications into your app by running the following command in the command line:
phonegap plugin add
https://github.com/Pushwoosh/pushwoosh-phonegap-3.0-plugin.git
I tried that (copy and pasted it into terminal) and it gave me an error: [error] project directory could not be found
if you are using cordova, just use this other command (as with other cordova plugins):
cordova plugin add https://github.com/Pushwoosh/pushwoosh-phonegap-3.0-plugin.git
Related
when I try the following command in VS Code
sudo ionic cordova platform add iOS
I get an error with the following:
ERROR] An error occurred while running subprocess cordova.
cordova platform add ios exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
I get iOS folder in platforms folder, but how to solve this error ?
First, why are you running with sudo? I would recreate the project in a directory which does not require this. For example ~/dev/myProjectName
Second, when you scroll up it should give a more specific error.
Third, if not have you tried doing as shown and run with --verbose flag?
Fourth, try opening platform/ios project in xCode and running from there. It may give more useful info.
Initially, I am trying to install Facebook Auth but I am running into the error:
Error: cordova-universal-links-plugin-fix is not installed
I think I need to install cordova-universal-links-plugin using plugman, and I am trying like this:
plugman --platform ios --project /Volumes/EamonWD/hybridpool/HybridPool --plugin https://github.com/nordnet/cordova-universal-links-plugin --plugins_dir /Volumes/EamonWD/hybridpool/HybridPool/Pods/phonegap-ios-template/resources/www/plugins --www /Volumes/EamonWD/hybridpool/HybridPool/Pods/phonegap-ios-template/resources/www
/Volumes/EamonWD/hybridpool/HybridPool - location of HybridPool.xcworkspace and HybridPool.xcproj
I created the XCode project for HybridPool hybrid app following the cocoapods instructions here:
http://docs.phonegap.com/tutorials/develop/1-embed-webview/ios/
I think all of the parameters are the correct locations, but when I hit enter, it just spits back the plugman manual (because something is wrong). What am I doing wrong?
UPDATE
In the manual it says:
plugman manages plugin.xml-compatible cordova plugins into
cordova-generated projects.
But I don't have a plugin.xml file I don't think...
UPDATE
I noticed in the repo:
https://github.com/nordnet/cordova-universal-links-plugin/blob/master/plugin.xml
So the plugin has a plugin.xml file, so maybe plugin.xml isn't the problem?
Forgot install in command, should be plugman install ...
I am trying to add barcodescanner plugin to an Phonegap 3.3.0 project.
Steps to reproduce:
$ cordova create app de.app.name "app-name"
$ cd app
$ cordova platform add ios
$ cordova plugin add com.phonegap.plugins.barcodescanner
Fetching plugin from "com.phonegap.plugins.barcodescanner"...
Starting installation of "com.phonegap.plugins.barcodescanner" for ios
Error during processing of action! Attempting to revert...
/usr/local/lib/node_modules/cordova/node_modules/q/q.js:126
throw e;
^
Error: Uh oh!
cannot find "/path/app/plugins/com.phonegap.plugins.barcodescanner/src/ios/CDVBarcodeScanner.mm" ios <source-file>
at module.exports.source-file.install (/usr/local/lib/node_modules/cordova/node_modules/plugman/src/platforms/ios.js:44:48)
at Object.ActionStack.process (/usr/local/lib/node_modules/cordova/node_modules/plugman/src/util/action-stack.js:46:25)
at handleInstall (/usr/local/lib/node_modules/cordova/node_modules/plugman/src/install.js:380:20)
at /usr/local/lib/node_modules/cordova/node_modules/plugman/src/install.js:331:20
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/plugman/node_modules/q/q.js:798:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/plugman/node_modules/q/q.js:827:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/plugman/node_modules/q/q.js:760:13)
at /usr/local/lib/node_modules/cordova/node_modules/plugman/node_modules/q/q.js:574:44
at flush (/usr/local/lib/node_modules/cordova/node_modules/plugman/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:415:13)
If I use the github link I get the same error in short:
$ cordova plugin add https://github.com/phonegap-build/BarcodeScanner
Fetching plugin from "https://github.com/phonegap-build/BarcodeScanner"...
Starting installation of "com.phonegap.plugins.barcodescanner" for ios
Preparing ios project
/usr/local/lib/node_modules/cordova/node_modules/q/q.js:126
throw e;
^
SyntaxError: Unexpected token
Also I get the same for the original version of the plugin:
$ cordova plugin add https://github.com/wildabeast/BarcodeScanner
I found a thread about a problem in phonegap 3.0.0 but https://github.com/jonathannaguin/BarcodeScanner still gives me the same error.
I guess the importen part is cannot find "/path/app/plugins/com.phonegap.plugins.barcodescanner/src/ios/CDVBarcodeScanner.mm" ios. Any thoughts how I can dig deeper into this and make it work?
Update
I got the same problem with org.apache.cordova.console. Also if I use phonegap local plugin add ....
I notice that www/config.xml and platforms/ios/www/config.xml are broken. There is some binary empty space at the end of the file that can be removed. There might be something messed up with phonegap itself.
Problem is caused by the directory I am in. If I do cd ~ and run the same command it just works!
I was in \Volumes/www with is a samba share mounted over smbfs.
I am using Phonegap 3.0 for my latest project. I tried to add the native sqlite database plugin to prepopulate data from an existing database. The issue is i could install the plugin through commandline . It showed the following error:
#phonegap local plugin add https://github.com/jarlehansen/PhoneGap-SQLitePlugin-iOS.git
adding the plugin:
https://github.com/jarlehansen/PhoneGap-SQLitePlugin-iOS.git
fs.js:427 return binding.open(pathModule._makeLong(path),
stringToFlags(flags), mode);
^ Error: ENOENT, no such file or directory '/var/folders/7j/1qkbsztx3_bgtslq3pnnr9jc0000gn/T/plugman-tmp1383202788796/plugin.xml'
at Object.fs.openSync (fs.js:427:18)
at Object.fs.readFileSync (fs.js:284:15)
at Object.module.exports.parseElementtreeSync (/usr/local/lib/node_modules/phonegap/node_modules/cordova/node_modules/plugman/src/util/xml-helpers.js:119:27)
at /usr/local/lib/node_modules/phonegap/node_modules/cordova/node_modules/plugman/src/util/plugins.js:67:39
at /usr/local/lib/node_modules/phonegap/node_modules/cordova/node_modules/shelljs/shell.js:1707:7
at ChildProcess.exithandler (child_process.js:635:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Socket.<anonymous (child_process.js:948:11)
at Socket.EventEmitter.emit (events.js:95:17)
I tried to manually install the plugin by importing the header files and main files and js file and then by adding feature to config.xml. But that also was a failure,.
Please Help me out to install this plugin in Phonegap 3.0
Within Cordova you can install the plugin from remote location like this:
cordova plugin add https://github.com/brodysoft/Cordova-SQLitePlugin.git
But I guess you need Git locally installed as a prerequisite. Not sure how the PhoneGap command looks like. Credits go to here.
First thing that comes to my mind when there is no such file or directory is that the directory doesn't exist because whatever tried to create it did not have proper permissions.
Try checking the permissions (this may just be a matter of running it with 'sudo')
It's a longshot, but i found that sometimes the install worked only when i used the cordova command line. download its bin and try the following:
cordova install --platform <android/ios> --project <project dir> --plugin <plugin's git>
I got is solution by using this plugin https://github.com/lite4cordova/Cordova-SQLitePlugin
which offers adding though Cordova CLI commands.
I am trying to create a new project, following:
$ phonegap create test com.temp testX
$ cd test
$ phonegap build ios
$ phonegap local plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git
The plugin (device) is successfully downloaded to test/plugins/, but not successfully install to test/platforms/ios/testX/Plugins/. Opening the project in Xcode will show those files are missing. Manually copy and reference them won't completely fix it.
What is the cause of this?
PS: It works if I dont specify the project's name:
//project name will be HelloWorld.xcodeproj
$ phonegap create test
Add the plugin before you build iOS by switching the order of your last 2 commands
Hi "git" is also a node module. Simplest way want i found is.
npm install -g git
This will install git in you node source location as a module.
Restart the machine.
Install phonegap plugin:
C:\Users\user1\yourprojectname>cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-camera.git
You will get response as:
Fetching plugin from "https://git-wip-us.apache.org/repos/asf/cordova-plugin-cam
era.git"...
Starting installation of "org.apache.cordova.camera" for android
Preparing android project
org.apache.cordova.camera installed on android.
Hope this will be very helpful. If any issue reply.