HTML in under 10 minutes

Advertisements

Win a free copy of #App Factory

You can enter to win here until Monday.

How to watch trailers on Netflix.com

I love Netflix. However, before today, I had to go to Youtube to watch trailers for movies I didn’t know about on Netflix’s discovery pages. So, I created this Chrome extension that adds a button under movie titles in Netflix so you can watch trailers without leaving your Netflix home screen.

You can get the plugin for Chrome -> here

Image

Will you wear these glasses?

Will you wear these glasses?

Space Glasses… for real. by Meta.

Loving and Hating Phonegap 3.0

 

love-hate-baby1

If you’ve been using Phonegap as long as I have, you remember when the config.xml was a plist file.

Times have changed. And Phonegap keeps changing with it. I don’t know if I should hold a grunge against Adobe for buying Phoengap and trying to rebrand it as Cordova (in a very confusing fashion… is it the Phonegap Command Line Tool or the Cordova Command Line Tool… pick one… Why are there two command line tools that essentially do the same thing?!)  Then again, I wonder if Adobe is  actually doing me a favor. The Phonegap platform seems to become easier to use over time.

But at what cost?

My problem: I can’t use the Phonegap every time they release a new version because their old rules typically just don’t apply anymore. It’s like going to a convenience store once a week, and every week, the store management changes the location of all the things you buy. Where’s the convenience in that?

Yes, the new Command Line Tool kind of makes it easier to install plugins… But not if I already learned the ridiculous (kind of different everytime) way of installing plugins from Phonegap 2 and before. I’m used to manually adding my .m and .h files to my project.  I’m used to dealing with different files, in different environment for iPhone and Android (Though, I have to say I love Phonegap’s new Build tool, but I don’t like that this once free software, now costs a monthly subscription fee!) Instead of me having to install it now… I’m used to geolocation just coming built in. Along with the camera and local storage plugins. Which used to be features in the plist, wiat the config, wait, the plugin… you see what I mean?

Why do I have to install and configure the the camera, local storage, compass,  device, and file transfer capabilities now? Additionally, maybe I set a timeline for project, and now that planned timeline is irrelevant to reality because I’m having to spend days relearning a tool I’ve been using for years. Just a little rant. You know.

I believe that platforms like Phonegap should make updates that actually work the same way for developers (call me crazy), so developers don’t have to relearn stuff just so others who haven’t been using it can have an “easier time”. Also, I’m not completely convinced that that’s what’s actually happening, though, they make a good case… Though, most newbie coders aren’t typically that comfortable with the command line, and that’s now pretty much required to compile and application. Back in the day (2010… yeah, way back), everything was drag-and-drop. And if you’re going to make us learn, essentially, a new platform (that you call an update),  at least support the old methods of doing things. Phonegap doesn’t provide this courtesy.

This is kind of making me feel like I should just make what I speak of. Then again, Phonegap has already gone so far with the development of this whole thing, and for all the different phones.

The other problem: What about all my old apps? Since I’ve learned this new way, I have to go back to my other projects and completely screw them up by trying to get new plugins to work with legacy code. The whole thing’s a big mess. And it leads to a bunch of error messages and weird hieroglyphical-like red markings in Eclipse and XCode. Then, that leads to hours googling error remedies, landing on Stack Overflow time and time again, and hoping someone’s tip is right. It’s 80-20 (correct-incorrect).

I suppose this is a call for other developers to band together, and let’s create something better.

Adapting legacy Phonegap plugins for Phonegap 3.0

Image

In order for plugins that worked for Phonegap 2.9 (and under) to work with the new Phonegap 3.0, you have to add a plugin.xml to the plugin’s folder where the .m and .h files (for iOS) are located. You might need to edit the .m files for plugins built for iOS, as well.

To get an example of how the new plugin.xml file should look, check out this code I recently posted to GitHub for a Card.io credit card scanner plugin update: https://github.com/m140v/card.io-iOS-SDK-PhoneGap/blob/master/plugin.xml

Once you do this, you will also have to replace all the

(void)scan:(NSMutableArray *)args withDict:(NSMutableDictionary *)options

-type declarations with:

– (void)scan:(CDVInvokedUrlCommand*)command
in the .m files for iOS.
To integrate your plugin into your app, you can simply use Phonegap’s new command line tool (also called the CLT) in your terminal (in the root directory of your project) by typing:
phonegap local plugin add https://git-wip-us.apache.org/repos/asf/project-name.git
Also, for some reason, all the original plugins that originally came packaged with Phonegap are no longer packaged in. You have to add all of this this way. For further documentation on this, check out Phonegap’s website.
Once you do that, you should be all set. If you have any further issues getting your plugins integrated into your Phonegap projects, ping me on twitter at @itsdeshazer.

What it feels like to skydive from space