Error in installing plugin for Phonegap 3.1 (iOS) - ios

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.

Related

Alternative for hybrid web app without knowledge in app/server

i used to upload my ZIP (with HTML5/CSS web app) in phonegap since 4, 5 years and create cool mobile apps. But since some months it's look like Adobe dismiss the project, no more answer on forum etc.
Is there a good solution, when you don't know everything about shift/cocoa/java and server things, to simply upload your webapp (basically a website in a zip) and get IPA/APK ?
I heard about monaco or voltbuilder. Thanks
Not really. Although I can confirm https://build.phonegap.com works for me. If you have an error related to a malformed xml, you can try to delete the project on the website and re-uplading the zip file onto a new project. That's a bug I have experienced in the past.
Otherwise, you can install Cordova and Phonegap on your pc to build it using npm on the terminal (Linux/MacOs).
$ sudo npm install -g cordova
or for windows (CMD):
C:\> npm install -g cordova
then navigate with the command line using cd to go to a folder
eg. cd myfolder.
You can see the files in your current directory with ls (Linux/MacOs) or lsdir (windows)
Once you are in your project's folder and that you can see with lsdir or ls your config.xml file of your project, then you can run those commands to add the platform you want to build:
cordova platform add ios
cordova platform add android
Finally to build the app, you need to:
cordova build
Note: To build an Ipa, you will need to use a device running MacOs since it requires XCode. I highly recommand you to get familiar with Cmd or the terminal if you are building an app.
I hope I have answered your question well

Trying to install plugin with plugman to phonegap hybrid ios app / cordova-universal-links-plugin / cordova-universal-links-plugin-fix

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 ...

Meteor cordova plugin webapp fails to build on Xcode 8

I got the same issue as this guy
And this thread
When running my app as meteor run ios-device and then trying to run it form Xcode8, it throws a lot of issues.
Tried setting the swift version to legacy support in the build settings for the project without luck, also bumped the version from 1.2.8 to 1.3.0, didn't work.
It seems it could be fixed by changing to swift3 branch but I don't know how to do this since this package is being pulled by Atmosphere, so it's probably selecting master branch from npm and overriding the files each time I try to run it with meteor run ios-device
This is the Broken Package Github Repo
Doing meteor add will override the default plugin version that comes with Meteor, you just need to point to the specific commit. Taken from https://forums.meteor.com/t/ios-10-compatibility/26065/17
meteor add cordova:cordova-plugin-meteor-webapp#https://github.com/meteor/cordova-plugin-meteor-webapp.git#8bf95eed3f313299fc2de33658866278eea2cdc5
As suggestet by erikwall, but instead of
meteor add cordova:cordova-plugin-meteor-webapp#https://github.com/meteor/cordova-plugin-meteor-webapp.git#8bf95eed3f313299fc2de33658866278eea2cdc5
just do:
meteor add cordova:cordova-plugin-meteor-webapp#latest
For me did work just with latest

cordova console log can not be installed

I am trying to install the cordova console.log plugin.
when i am trying to install it using the command line using:
cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-console.git
I am running it from the path of the root application path
the structure of the folder is:
projName
|-- --project
|-- projName
|-- cordova
|-- CordovaLib
|-- projName.xcodeproj
|-- plugin
And the error i receive in the command line is
[Error: Current working directory is not a Cordova-based project.]
i should mention that i build the cordova project manually using imports of the frameworks because in the xcode new project window there was not Cordova/Phonegap new project option.
I am using xCode 5.0.1 and cordova 3.1.0
The error you get is self-explanatory, it is because you have not created a cordova project as it must be created. Keep reading to solve the problem.
Cordova basic project preparation steps
Based on my comment and your answer, you should follow the cordova workflow for creating projects using the CLI (command line interface), it is strongly recommended to avoid unnecessary problems, and the steps are not hard to follow.
Please follow the steps described here (official doc), read it fully, it will save you more time later if you read it:
http://cordova.apache.org/docs/en/3.2.0/guide_cli_index.md.html#The%20Command-Line%20Interface
In brief the steps are:
Install node.js
Install cordova using npm
Create a cordova project / app using the CLI
Add the desired platform to the project (android, ios, etc, as needed)
Work on your project
Add cordova plugins as necessary (for example if you need notifications add the notificacion plugin)
Build the project
Test of device or emulator (in your case iPhone, iPad simulator)
iOS Platform Guide
Also check the iOS Platform Guide completely, it is very helpful, explain additional instructions to prepare and work with XCode.
http://cordova.apache.org/docs/en/3.2.0/guide_platforms_ios_index.md.html#iOS%20Platform%20Guide
Plugins
For each plugin in the API reference you will find instructions to install them using the CLI, as well as to "uninstall" them.
Only install the plugins you will need
Just for reference, the code to install notifications-dialogs plugin using the terminal (run the command inside your project folder):
$ cordova plugin rm org.apache.cordova.dialogs
On the other hand, the easier way to solve the problem is create the new project following the noted steps and later just add your existing code or files to the proper folders, as well as add the required plugins, not that difficult.

Add SQLite Plugin to Phonegap 3.0 from commandline

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.

Resources