Updating Cordova plugins

Well, mine was an older Cordova project, and I was under the impression that every time I update the Cordova installation, or the platform (ios/android) the plugins too upgrade. Well my fault! It seems we have to manually delete and re-install each plugin (Yes! there is no update command for plugins yet!)

So the plugins looked like initially :

cordova plugin ls

com.msopentech.websql 0.0.9 "Web SQL plugin"
cordova-plugin-inappbrowser 1.2.0 "InAppBrowser"
cordova-plugin-whitelist 1.1.0 "Whitelist"
org.apache.cordova.console 0.2.13 "Console"
org.apache.cordova.device 0.3.0 "Device"
org.apache.cordova.dialogs 0.3.0 "Notification"
org.apache.cordova.file 1.3.3 "File"
org.apache.cordova.file-transfer 0.5.0 "File Transfer"
org.apache.cordova.network-information 0.2.15 "Network Information"

For updating Cordova plugins, there is no update command. I know, we did not see that coming!

So to update a single plugin, you need to execute 2 commands:

cordova plugin rm <plugin-package-name/>
cordova plugin add <plugin-package-name>

So for eg you can :

cordova plugin rm org.apache.cordova.file
cordova plugin add cordova-plugin-file

Yes the package names change sometimes, and you can get the details of the latest package names from the official documentation.

So after the changes the plugins were updated to :

com.msopentech.websql 0.0.9 "Web SQL plugin"
cordova-plugin-inappbrowser 1.2.0 "InAppBrowser"
cordova-plugin-whitelist 1.1.0 "Whitelist"
org.apache.cordova.console 0.2.13 "Console"
org.apache.cordova.device 0.3.0 "Device"
org.apache.cordova.dialogs 0.3.0 "Notification"
org.apache.cordova.file 1.3.3 "File"
org.apache.cordova.file-transfer 0.5.0 "File Transfer"
org.apache.cordova.network-information 0.2.15 "Network Information"

Yes, quite some updates, sorting all the errors and warnings!

I also saw information about some scripts, if the package names are same, I believe they can be useful. Please check Stackoverflow for more details.

Cheers!

Cordova updates and the pain!

Being back after a long time!

You know I have to be here and there, everywhere!

So there was this error, wasting my days from a long time!

And whenever I do an update, this used to come back on my ios builds.

Plugins/cordova-plugin-whitelist/CDVNavigationWhitelistPlugin.h:23:9: fatal error: 
      'Cordova/CDVURLRequestFilter.h' file not found
#import <Cordova/CDVURLRequestFilter

And I searched internet for long (2 months I recall!) but no solutions!

Funny thing,

Earlier, any problem I used to have, I simply did

cordova platform remove ios

cordova platform add ios

And it used work like a charm!

But, not this time!

Stumbled upon this one today! (I dont know why not earlier, anyways – here is the link!)

The key point to note over there is

Cordova-ios version 4.0 and greater does not require the cordova-plugin-whitelist plugin to be installed, however it’s configuration details apply to iOS too.

Why Cordova? Why you do this? Would it not have been helpful to keep some helpful suggestions when showing the errors, or same backward compatibility!

So the solution is :

execute the following command

 cordova plugin remove cordova-plugin-whitelist

And the build was now prepared error-free, smoothly! Feels relieved! I was done blaming Xcode for all the issues!

Please note, however if you use the same code space to prepare build for android (where this plugin is still needed), you might have to create a copy of the project and add the plugin to the android version of the project separately. (Yes we need options to add different plugins to different platforms of the same project!)

Hope this helps someone! Cheers!

Understanding Deep Links

Recently I came across the term “Deep Links“.

Basically for one of our clients, we were updating the app page on Facebook, and to use the app directly from the Facebook page you need to provide the Deep Links.

Here is what Wikipedia says about Deep Links.

In the context of the World Wide Web, deep linking is the use of a hyperlink that links to a specific, generally searchable or indexed, piece of web content on a website (e.g., “http://example.com/path/page”), rather than the website’s home page (e.g., “http://example.com/”).

Okay, so from my understanding it is useful for SEO purpose. I specifically came across this with regards to mobile applications. Here is what I found on the topic:

Mobile deep linking is a methodology that allows mobile apps to communicate with the mobile web or with other mobile apps via clickable links directing users to a specific landing page or screen inside the app instead of sending them back to a mobile site or store. Deep linking helps reduce the conversion friction by shortening the users’ path to the piece of content, product or promo they are interested in.

WHAT TYPE OF APPS CAN BENEFIT MOST FROM DEEP LINKING?

For apps such as shopping, travel, hotel booking, music and news the ability to send users to a specific product, offer or promo page can have tremendous effect over conversion rates and ultimately revenues. If deep linking is enabled, the user can be navigated directly to a certain hotel booking page for which he has seen an advertisement instead of the app’s home page. Last year Facebook announced its deep linking ad format, letting users come back to familiar apps from ads in their feeds.

So basically,

Deep Linking is a methodology for launching a native mobile application via a link and it connects a unique url to a defined action in a mobile app, seamlessly linking users to relevant content.

Now this looks good and something new.  I will be updating the steps to integrate Deep Links in mobile apps (hybrid/native) in my next blog post.

Enjoy you stay!

Ref:  telerik.com