Friday, June 19, 2015

Including Plugins with Cordova Command Line Interface 5

You may have noticed that things have changed up a bit as of Cordova CLI 5.0.0 release. Specifically, we are now encouraging the the use of <plugin> tags in your config.xml file over the previously used <feature> tags.

You may be wondering why you should use the <plugin> tag. The main reason is that when you use the <plugin> tag it will fetch and install the plugin for you during the cordova prepare phase of building your project.

So if you have the following feature tags in your current config.xml:
<feature name="org.apache.cordova.file">
    <param name="id" value="org.apache.cordova.file@1.0.1"/>
</feature>
<feature name="org.apache.cordova.file-transfer">
    <param name="id" value="org.apache.cordova.file-transfer@0.4.2"/>
</feature>
<feature name="org.apache.cordova.device">
    <param name="id" value="org.apache.cordova.device@0.2.8"/>
</feature>
<feature name="com.telerik.plugins.nativepagetransitions">
    <param name="id" value="https://github.com/Telerik-Verified-Plugins/NativePageTransitions#0.2.11"/>
</feature>
<feature name="com.phonegap.plugins.pushplugin">
    <param name="id" value="https://github.com/phonegap-build/PushPlugin#1979d972b6ab37e28cf2077bc7ebfe706cc4dacd"/>
</feature>
Then you'd just replace it with:
<plugin name="cordova-plugin-file" spec="^2.0.0" />
<plugin name="cordova-plugin-file-transfer" spec="^1.0.0" />
<plugin name="cordova-plugin-device" spec="^1.0.0" />
<plugin name="com.telerik.plugins.nativepagetransitions" spec="https://github.com/Telerik-Verified-Plugins/NativePageTransitions#0.2.11" />
<plugin name="com.phonegap.plugins.pushplugin" spec="https://github.com/phonegap-build/PushPlugin#1979d972b6ab37e28cf2077bc7ebfe706cc4dacd" />
You may have noticed that the package ID for org.apache.cordova.file has changed to cordova-plugin-file. The is part of the way plugins are now hosted on npm. You'll notice that all the core plugins (org.apache.cordova) have been renamed (see table below).

For non-core plugins you can still download them from a git repository. In order to specify a specific version you use #versionNumber for example, NativePageTransistion above or to download from a specific commit use #commitHash for example, PushPlugin above.

Old ID NPM ID
org.apache.cordova.battery-status cordova-plugin-battery-status
org.apache.cordova.camera cordova-plugin-camera
org.apache.cordova.contacts cordova-plugin-contacts
org.apache.cordova.device cordova-plugin-device
org.apache.cordova.device-motion cordova-plugin-device-motion
org.apache.cordova.device-orientation cordova-plugin-device-orientation
org.apache.cordova.dialogs cordova-plugin-dialogs
org.apache.cordova.file cordova-plugin-file
org.apache.cordova.file-transfer cordova-plugin-file-transfer
org.apache.cordova.geolocation cordova-plugin-geolocation
org.apache.cordova.globalization cordova-plugin-globalization
org.apache.cordova.inappbrowser cordova-plugin-inappbrowser
org.apache.cordova.media-capture cordova-plugin-media-capture
org.apache.cordova.media cordova-plugin-media
org.apache.cordova.network-information cordova-plugin-network-information
org.apache.cordova.splashscreen cordova-plugin-splashscreen
org.apache.cordova.statusbar cordova-plugin-statusbar
org.apache.cordova.whitelist cordova-plugin-whitelist
org.apache.cordova.vibration cordova-plugin-vibration

Saturday, June 13, 2015

Mud Hero 2015

So last Saturday Anna and I participated in the Mud Hero Ottawa run. It was an absolute blast as you can probably tell by looking at the smiles on our faces. We took a bunch of pictures during the day which I have in an album over here.
First up Anna ran the kids course which was three 500 meter laps with 6 obstacles. The announcer constantly mentioned to parents to make sure that the kids schools were on tight or else they would lose them in the mud pit. Predictably, this led to a bunch of parents having to dig in the mud pit for their child's missing shoe.

Anna escaped with both of her shoes but as you can see she got super muddy which I encouraged whole heartedly.
Then I finally had my chance to run the 6km course with 20 obstacles with my buddy Hicham and one of his neighbours. There were some really fun obstacles like walls, tires, ropes, slides but by far the most fun was the waist deep (or deeper) mud. You can see in this pic I've just come down the slide and luckily retrieved my hat from the mud puddle.

After the race the team from Muscle Mlk was there to hand out ready to drink protein shakes. I don't know if it was because I just ran 6km but that was the best vanilla shake I've had in a long time.

For anyone who is interested in these types of races I can offer a few tips:

  1. Bring a complete change of clothes including shoes. You will not want to put your muddy shoes on after getting clean.
  2. Wear non-cotton underwear. You really need something that isn't going to trap in a pound of dirt in your skivvies. 
  3. Bring a big fluffy towel to get warm. The "showers" are generally hoses of cold water so you will go from being over heated to freezing in no time. The fluffy towel will help.
Next up is the Bad Ass Dash on July 18th in Nepean. Anyone interested in joining?


Wednesday, June 10, 2015

Tuesday, May 19, 2015

PhoneGap Day EU 2015 - Push N' Pull

Yesterday, I was happy to present at PhoneGap Day EU in Amsterdam. It's one of my favourite days of the year. Besides getting to hang out with all of my co-workers who I rarely get to see in person as we are separated by half a continent I get to talk in person with the people who use our software.

At PG Day I was presenting on the work that we've been doing in order to make the lives of developers easier. My presentation introduces the new and improved Push Plugin as well as the completely new Content Sync Plugin. I'll be blogging more about these two new plugins in the up coming weeks but for now if anyone wants to check out the slides they are embedded below:

Tuesday, December 2, 2014

VideoPlayer Plugin Updated for Cordova/PhoneGap 3.x and Above

Happily, I'm getting the chance to go back and visit some of my older plugins. I've just updated the VideoPlayer plugin so you can install it via the command line tools. To install via the command line just do:

cordova plugin add https://github.com/macdonst/VideoPlayer

For more information on how the plugin works check out my old post on the topic.

Monday, November 17, 2014

My Speech Rec Presentation at InfoQ NY

The slides and video for my speech recognition presentation are up now at the InfoQ site. Feel free to watch it and laugh at my demo fail.

Monday, August 4, 2014

Books I've Read This Week

Creativity, Inc.: Overcoming the Unseen Forces That Stand in the Way of True Inspiration by Ed Catmull is a book that I enjoyed because it does a pretty good job of giving you the back story on how the company Pixar came to be. Pixar is the fascinating company that has given us wonderful movies like Toy Story, Up and Wall-E. It is really interesting to hear how they overcame various challenges over their lifetime.

Where it doesn't work for me is a business book. Most of what Mr. Catmull tries to import as knowledge seems like rehashed platitudes to me. He even makes allusion to this in the book. What's even worse is a lot of his people first approach in this book rings false as he's been implicated as a central figure in a wage fixing scandal.

So I'd rate this book as a solid borrow for those of us who want to learn more about how movies are made at Pixar.