Cordova fetch plugins in mac - macos

I'm newby with Cordova and with mac. I have a next issue: I need to fetch plugins to my project from fetch.json.
I'm doing next thing: cordova prepare and next cordova platform add ios
but it doesn't copy plugins to folder /plugins. Don't know why?
Thanks in advance.

You might want to take a look at this question and its answer: What is the purpose of fetch.json file inside cordova plugins folder?. It sounds like it isn't possible to restore plugins using that file, as it (only) checks locally? Honestly, this is the first time I'd heard of the file. :-/
For building from the command line I normally use the command:
cordova plugin add <plugin>
for each plugin you are using. Usually this isn't a huge list, and the commands only need to be invoked once. After that, it's just a cordova build to compile.
If you're using PhoneGap Build, you define the plugins in the config.xml file. There's quite a bit of information on how to use the service and the parts of the config.xml file up on the site: http://docs.build.phonegap.com/en_US/configuring_basics.md.html#The%20Basics.

I found the issue it was because of I have installed Node 5, with Node 4 it works ok.

Related

Why is Android Studio failing to build, with an AAPT2 error on images?

After a recent update, Android Studio fails to build an unmodified project with errors along these lines:
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> AAPT2 aapt2-4.1.1-6503028-linux Daemon #0: Unexpected error during compile '/path/to/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png', attempting to stop daemon.
This should not happen under normal circumstances, please file an issue if it does.
Notice that it's failing on an image supplied by Android Studio itself!
What can I do to fix it?
This seems to be an error in the newest (newer?) Gradle plugin(s) when it comes to PNG images; Google's IssueTracker lists several newly reported bugs along these lines. One of them mentions that it's a Gradle issue; I made mine work by reverting to a previous version: Gradle Plugin 4.0.1 and Gradle version 6.1.1 work fine.
It will be necessary to ignore AS' nagging about a newer version until this gets fixed.
[Added at the request of #YinOrYan]
To revert to an older version of Gradle:
In the menu, select "Files", then "Project Structure..."
In the dialog that pops up, select "Project" (first item in my version).
You can select the desired versions of the Gradle plugin and of Gradle from the drop-down menus.
This should not lose any system calls, as this is different from the SDK or API versions. However, it's not independent of them, so there is probably a limit to where you can set them.
As usual you will want to be online when you first build, or whenever you have to import a dependency, but otherwise it should be possible to work offline.
Sadly, it looks like an issue with older architectures. While the team at Google is looking into fixing it, in the meanwhile you can still use the new Android Studio and AGP, but temporarily revert to using an older version of AAPT2:
Try locating the old aapt2 executable in your gradle cache, e.g.:
~/.gradle/caches/<subdirectories, hashes
etc>/aapt2-4.1.0-alpha03-6246747-/aapt2(.exe)
Once you have the path you can add to your gradle.properties file:
android.aapt2FromMavenOverride=path/to/old/aapt2
To make this a little bit more robust you can actually copy that executable to a non-cache location, in case you clean your caches and it dissapears.
Hope this helps! Keep an eye on the Issue Tracker bug for updates.
I also had the same problem with AAPT2 errors and I have got over it.
First, downgrades Gradle to version 4.0.1, or
Second, I have done is upgrading the AMD Athlon processor to AMD FX-4300 without downgrading the gradle plugin version.
Wow, that's a real show-stopper! Can you explain how you reverted to an older gradle in Android Studio. Is it possible to work offline after doing this. And, did you lose any of the new system calls as a result? All this going on after finally getting my code working with the new AR Core stuff...

How to display teamcity android lint results xml file generated by build

one of my teamcity builds generates an xml file and I am wondering if there is a plugin to display the file generated against the build.
This file happens to be the android lint results of my android application project but I couldn't find an android lint specific plugin to handle the whole process so I am trying to make the same thing on my own by running the mvn android:lint command of the android maven plugin and then access the xml file somehow.
UPDATE: with regards to the android lint stuff, Teamcity has integrated the Intellij inspections that include lint checks (i think) so I think I should be ok with that.
Overall though, and mostly just out of plain curiosity do you reckon there is a way to display generated files against a build, rather than manually accessing the folder where they got generated?
You can use Build Artifacts or you can use the Teamcity Reporting feature.

Is it possible to run jenkins with two different iOS sdks

We are using Jenkins to run our xcodebuilds on a Mac Mini server. In the last weeks we started development of iOS 7 apps and we installed Xcode 5 DP versions on the Mac Mini.
When installing a new Xcode version and configuring the xcodebuild of the new Xcode which xcode-select this new version is also used for building our old iOS 6 apps - which breaks the UI of them.
Is there a way to tell Jenkins which xcodebuild it should use to build a project?
Check out the solution posted by Andy Molloy at http://andymolloy.net/specifying-xcode-version-for-jenkins-projects.
You have to install EnvInject plugin for Jenkins and add DEVELOPER_DIR=/Applications/Xcode5-DP6.app/Contents/Developer environment variable to your build job.
It doesn't look like it is possible to specify xcode version per jenkins job. Also switching xcode version on the command line requires root permissions.
You might manage to solve your issue by making sure your IOS 6 apps, when built with the new xcode, work properly. Try selecting the proper base SDK and deployment target http://www.clarkcox.com/blog/2009/06/23/sdks-and-deployment-targets/
If that won't work you could try forcing a switch of the xcode version to use at build time, pre xcode plugin use. You will have to fiddle with sudo rights. Given that this is a system setting, you might need to prevent multiple builds from happening simultaneously.
I would do my best getting the multiple builds working with a single xcode version though.
Select the xcode version at runtime
Use EnvInject plugin
for jobs that require the non default do something like
DEVELOPER_DIR=/Applications/Xcode6.0.1.app/Contents/Developer
under Inject environment variables to the build process
https://wiki.jenkins-ci.org/display/JENKINS/Xcode+Plugin

CordovaLib missing with Phonegap2.0.0

I am learning phonegap thru online tutorials.
I was creating facebook integration dummy app in xcode using phonegap by following step by step tutorial given at https://github.com/davejohnson/phonegap-plugin-facebook-connect
I was able to setup everything but one step where I was asked to add CordovaLib class path to XCODE was not working for me, I tried searching CordovaLib with downloaded and extracted phonegap(2.0.0) but couldn't find same.
At last, after spending good amount of time on google I could get CordovaLib from GITHUB and able to compile my project and make it work.
My question is, if CordovaLib is must for phonegap integration with Xcode, why is it not shipped with phonegap download ?
What is the best way to get CordovaLib in future for newer phonegap versions ?
There is no need anymore.
Note: Starting with Cordova 2.2, the project will have a copy of CordovaLib within it instead of having a dependency on the copy of CordovaLib from your Cordova installation.
guide_getting-started_ios

Give version programatically to a setup/deployment project

I have created a Visual Studio Deployment Project for my application. We are a using subversion to manage version numbers and I've got versionInfo.cs file which contains the version number. I want to give the version number I have in my application (versionInfo.cs) to the Version Property of the setup project. I am not sure how to it... Do I need to create a custom action? Or what's the best way to do that.
Thank you!
As for me, setting version is a responsibility of build process. So, you don't need a custom action - it is a part of installation logic and runs at install time. Instead, teach your build engine to put correct version to your installation package (e.g. read it from VersionInfo.cs and put to vdproj file).
Finally I fixed the issue.
I've setup Cruise Control build server and added Nant script to change the version in the setup project.
Thanks,
Charith

Resources