Just started seriously trying to get Appium (http://appium.io) running and functionally testing Cordova apps like Encryptr here.
It’s just a start, I have many more tests to write, but it sure does look cool watching your app being automated.
I see a lot of confusion still about the difference and relationship between Cordova and PhoneGap.
TL;DR: If you don’t need to use the cloud build service at PhoneGap Build, just use the Cordova CLI tools, not the PhoneGap ones.
Lemme see if I can start with the penny tour.
In the beginning, there was PhoneGap. It was an amazing project by a little company called Nitobi in Canada. It was open source, and it was good.
Then the little company and the name PhoneGap was bought by Adobe. Adobe did not buy the actual PhoneGap codebase, just the people that worked on it, and the name. The actual open source project was donated to the Apache Software Foundation.
So now the open source project needed a new name. After a couple of false starts, eventually they came up with “Cordova” – the name of the street the Nitobi offices had originally been on in Vancouver.
For a bit over a year, “PhoneGap” was just the Adobe binary distribution of the Apache open source project “Cordova” – you could think of PhoneGap as Safari to Cordova’s WebKit.
In version 3.x of Cordova – and therefore PhoneGap – a shift was made towards heavy use of a Node-based command line interface (CLI). It handles everything from creation of the project, installing plugins, and finally building and even running the app. It’s awesome, by the way, and if you haven’t made the switch away from the shackles of IDEs like Xcode and Eclipse, I heartily encourage you to give it a try.
Anyway… at the PhoneGap Day US conference, back in July of 2013 in Portland, we released the 3.0.0 version of Cordova. At the same conference, a variation of the Cordova CLI was launched called the PhoneGap CLI. The first split in actual functionality between the two had finally arrived.
The PhoneGap CLI is a similar-but-different variation on the Cordova CLI. It does much of the same things and even uses the Cordova CLI under the hood. The biggest difference lies in its connection to Adobe’s cloud build service called PhoneGap Build. The PhoneGap CLI allows you to – from the command line – create and build apps using that service. You don’t need the SDKs for the various platforms installed on your machine.
However, aside from some small syntax differences – and a couple missing features, if I am to be honest – the use of PhoneGap Build is the only difference at the time of this article. So as I said in the TL;DR above, my advice is that if you don’t need to use the cloud build service at PhoneGap Build, just use the Cordova CLI tools, not the PhoneGap ones.
More importantly, whatever you do, do not “mix and match” in a single project. This will only make a big mess.
I hope that clears it up a bit… if not, please feel free to send me an email, or come and hit me up me in the #phonegap channel on Freenode IRC.
I was working on a new actual post (as opposed to just posting slides like I have been lately) and realised that my grunt-init-cordova slides never made it onto the blog. I have just totally updated grunt-init-cordova (as part of writing the upcoming post) and there will be more about it there.
Slides from my talk at the Melbourne Mobile meet up - August 20th, 2013.
So, I decided to advocate for “none of the above”
Slides from my talk at the Melbourne Mobile meet up - May 21st 2013.
This is my attempt at a non-techical talk about the path that led to the current Android version of the open source SpiderOak mobile client app.
Cordova-CLI is doing some great things to make working with multiple platforms in one Cordova project easier. But installing with it can initially seem a little daunting if you’ve never played with it before, and so I thought it would help to write this guide up to help anyone else getting their…
A popular pattern in iOS lately (especially in apps with a focus on photo taking) is the raised / highlighted middle TabBar button. It’s easy enough to get a native TabBar in an iOS PhoneGap app using one of the two popular plugins (NativeControls and TabBar). There is even a great article on getting a raised middle TabBar button on iOS.
But not everyone using PhoneGap can comfortably turn that article into a modified TabBar plugin. There was even a recent thread on this topic in the PhoneGap Google Group recently.
Since I have done this in one of my apps, I thought I might post a quick outline on how to use the code in the iDevRecipes article above to get one of these buttons into one of the plugins above.
This is the button I created for my app Pixfor. It’s basically just a green tinted screenshot of the middle third of a standard TabBar with an Aperture icon and a subtle shadow. You certainly don’t need to have a tinted gradient as well as your larger icon or whatever. That’s just a design decision. The great thing about how this works is that the touch goes straight through the added UIButton, so the highlight of the TabBar still happens so if your button image has transparency, it will show through nicely.
The button image is named
aperture-tab.png and also has a corresponding
firstname.lastname@example.org image for retina devices.
Note: these images (unlike the icons normally used in the TabBar plugins as icons) are added to the project through XCode as a resource, not just copied into the
www folder with the other PhoneGap assets.
For example, in NativeControls:
window.plugins.nativeControls.createTabBarItem("takepix", "", "", options);
and in TabBar:
window.plugins.tabBar.createItem("takepix", "", "", options);
Pixfor happens to use the NativeControls plugin, but the code below should work in both.
Both these methods end with
What we are going to do is add the following code directly after this line before the closing brace.
This code will add a custom UIButton using our image centered on our TabBar. Note the file name
aperture-tab.png in the first line. The retina @2x version does not need to be explicitly referenced.
And there it is! Our special TabBar button.
* Line numbers only used for illustration. Please find the methods above in the plugin’s latest version.
So I know I haven’t been posting here much, what can I say?
But I did feel like posting that I have had my first ever rejection experience with the Apple App Store.
An app I have been building for a client got rejected for collecting donations for charity — even though the app did not collect actual money, it merely allowed you to convert points earned in the app to a charitable donation.
The reviewer was very nice about it and offered some suggestions on how to comply with the rules in this area.
Here is where this post turns into a love letter to PhoneGap/Cordova and KendoUI.
Like magic, I now have the charitable donations happening on a web site instead of the app, but with very little effort and it even looks the same aesthetically as the app!
The app has been resubmitted and our fingers are once again crossed.
As for the other problem (a lack of decent posts on this blog) I have been storing some up that I did not want to post until this app was finished. They should be coming very soon. I hope. Heh.
Cordova-CLI is doing some great things to make working with multiple platforms in one Cordova project easier. But...
I’d like to take a moment to share a bad user experience with you. Why? I believe it’s important to diagnose the...
In the post directly below I discussed the ramifications of bad form design on the overall customer experience. I compared...