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!

Reading chronicles: The Running Soul by Parul Sheth

Some background before my first post on the Reading Chronicle Series.

Well I have been an avid reader most of my life since childhood, and be it comics or novels, I read it, fast and complete it.

Just like finishing books, I used to finish things I started. My teachers loved me for that.

Times change.Things change. People change.

My life changes have set in since 2010. Each year since then has taught me something new. But as I am in the mid of 2016, I feel changes with the freshness of new beginnings.

I have noticed that recently be it a task, or a book – I start it, reach mid-way and never finish it. But yes in the last 2 years I did finish all the books by Dan Brown and Amish Tripathi. Specifically when I am reading non-fiction I get distracted.

So after several attempts with different books, I was recommended “The Running Soul” by Parul Sheth by my senior from college, Dipti Mishra. She is a runner with superb timings ( I last heard she completes 10k in an hour) and she is working hard on her running skills. I told her about my issues with concentration and fear of running. She recommended me some books and blogs, this being one. The selling point of this book was “Upasana this is a very small book, very few pages, you will be easily able to finish it!

Ha ha ha! Well, I got a kindle version of the book (yes these days I am trying to shift to kindle! Because if you actually visit my home, my room particularly – you will find books peeping out everywhere. I need a new home with a dedicated library room! )

So enough with the background and chit chat!

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The book has few pages, and yes it could be completed easily.

Parul is a woman like us, struggling with day to day responsibilities, family responsibilities. She met with some losses early in her life that changed the course of her life. But we cant escape reality? Right! Her strength became her children, family, friends, work, running buddies, tracks. She explains her journey of her practices, her developments as every practice was important, how running gave strength and meaning to her life.

She explains her fears before each running season, and the actual runs, the joy of completing each practice run and the big day(s). As I look at her from the descriptions, she is an inspiration for me to take up running. She has a job, kids, and chores like their exams, ups and downs in lives, but this does not stop her from her practices.

When we look at athletes (at least from perspective of people like me), we believe strongly in

“We are not athletes, they have different genes!

We were never meant to workout that hard!

I can’t run!  

Marathon, are you kidding!

21k? Do people actually run that long?

10k ? Why do you need to run that long?”

So yes, I too had those dilemmas. I am trying to overcome them. But Parul is an example that everyone has an athlete version of themselves.

If you say, one key takeaway from the book I should mention then it would be “working on my endurance“, not just in running, in every aspects of my life. I am sure if I give it enough dedication and practice, I could reach my best, like Parul did in her marathons 🙂

I like to read the books all from preface to the end. In the end there were quite some tips, that will be handy to anyone interested in running.

I am not a literature expert to give ratings to any book. But yes I could say whether a book is worth read or not (from my perspective obviously!). So yes, I would recommend the book of the personal journey of Parul Seth. A great addition to my collection. I am glad I came across this. Thank you Dipti di for recommending it.

The choice is between enduring and giving up. This is what separates the champions from the mere runners.

- Parul Sheth (The Running Soul)

Kudos to me to finishing my book! Stay tuned!

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!