Cordova is not a valid task

I am unable to launch my Ionic-2 app in IOS simulator by executing any of below commands
ionic cordova run ios
or
ionic cordova emulate ios

Everytime I run above commands, a message is printed “cordova is not a valid task

You are probably using a pre-v3 CLI, in which the “cordova” has not been added. Either forget “cordova” or upgrade CLI.